[rspec-users] Edge, link_to and mocks

2007-07-05 Thread Marcus Crafter
Hi All, Anyone noticed that using the newer link_to syntax in edge currently fails with mocked objects in view specs or helpers. eg. if you have something like the following in your view (or equivalent in a helper): <%= link_to @dog.name, @dog %> as opposed to the current 1.2 syntax

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread Don Petersen
I have no idea what the business logic is, but I guess I see a few words there which could be more concise. "should not allow" could become "disallows". Not much shorter, but I don't think it's written anywhere that everything must to start with "should"? "the same user to rate the same ag

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread Edward Ocampo-Gooding
Does this work? describe Agent, "rated by a user with the same kind of transaction" do it 'should not be rated twice' do # stuff end end s.ross wrote: > For that simple case, yes. But how about the case where I specify: > > Agent "should not be possible for the same user to rate the s

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread s.ross
On Jul 5, 2007, at 12:52 PM, David Chelimsky wrote: >> Agent "should not allow the same user to rate the same agent twice >> with the same kind of transaction" >> >> Thoughts? > > How would you phrase all this with context/specify? Or, a bit further > off target, TestCase/test_method? > I wouldn

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread David Chelimsky
On 7/5/07, s.ross <[EMAIL PROTECTED]> wrote: > For that simple case, yes. But how about the case where I specify: > > Agent "should not be possible for the same user to rate the same > agent twice with same kind of transaction" > > The English grammar gets a bit twisty. Perhaps: > > Agent "should n

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread s.ross
For that simple case, yes. But how about the case where I specify: Agent "should not be possible for the same user to rate the same agent twice with same kind of transaction" The English grammar gets a bit twisty. Perhaps: Agent "should not allow the same user to rate the same agent twice wi

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread Edward Ocampo-Gooding
> I'm looking through my specs and they work great, but they don't read > as English. I'm wondering how others are phrasing these. Here are > some examples: > > describe Agent do >it 'should be possible to create one' do >end > end Does describe Agent do it 'should be createable'

[rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread s.ross
I'm looking through my specs and they work great, but they don't read as English. I'm wondering how others are phrasing these. Here are some examples: describe Agent do it 'should be possible to create one' do end end This reads as "Agent should be possible to create one". Any suggest

Re: [rspec-users] Fwd: argument constraints docs on www site

2007-07-05 Thread David Chelimsky
On 7/5/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > Hi > > Thought I had found an actual issue here but turned out it was me > being an idiot. In the process though, I noticed that the rspec page > docs say you should use ":anything" rather than "anything()", > although it is deprecated. Any rea

[rspec-users] Fwd: argument constraints docs on www site

2007-07-05 Thread Ashley Moran
Hi Thought I had found an actual issue here but turned out it was me being an idiot. In the process though, I noticed that the rspec page docs say you should use ":anything" rather than "anything()", although it is deprecated. Any reason for that or does it just need updating? Ashley _

[rspec-users] mocking methods in the controller.

2007-07-05 Thread Daniel N
Hi, I'm very new to rspec so please be patient with me. I've tried to take some of my tests out of the controller specs to check for things that are rendered. This has not worked so well, since my views have the controller method current_user in quite a few places. Is there any way that I ca

Re: [rspec-users] Nicer failure message formatting

2007-07-05 Thread Wincent Colaiuta
El 5/7/2007, a las 10:28, Wincent Colaiuta escribió: > Pasting the diff here: > > > > Will also try submitting via RubyForge, but I have a lot of troubling > logging in thanks to the transparent proxy imposed by my ISP... :-( Managed to stay logged in long enoug

Re: [rspec-users] Nicer failure message formatting

2007-07-05 Thread Wincent Colaiuta
El 22/6/2007, a las 15:34, Wincent Colaiuta escribió: > El 22/6/2007, a las 14:36, Tom Locke escribió: > >> Easier to read: >> >> expected: >> "this is a very long string blah blah" >> got: >> "this is a very very long string blah blah" >> (using ==) >> >> Comments? > > For me even easier to read