Re: [rspec-users] Return code for running stories

2008-05-03 Thread Kero
>> I see neither #with_steps_for, nor #run return anything resembling >> the result of the tests (which does not really surprise me). >> >> So how to get the success/pending/failure of the stories out? >> Should I write a formatter/listener that exit(1)s on failure? >> >> PS: I'm back after a few m

Re: [rspec-users] spec'ing calls to super (or other Ruby keywords)

2008-05-03 Thread John D. Hume
I believe calls to super are sufficiently internal to the Ruby interpreter that a mocking framework can't intercept them without doing separate implementations for separate Ruby interpreters (and likely even separate versions). I could be wrong, but even so I'd recommend a different approach. If

Re: [rspec-users] BDD/Rails/Shoulda

2008-05-03 Thread John D. Hume
Even when working test/spec-first, when I'm pairing with someone who isn't experienced working that way, I find myself constantly saying "I'm pretty sure we don't need that yet." (I've just written the spec my pair is trying to get passing, so I know how little code we need.) If it happens then,

Re: [rspec-users] spec'ing calls to super (or other Ruby keywords)

2008-05-03 Thread Al Chou
In the particular case of super, another approach, though perhaps not using the spec framework, would be to assert (a la Test::Unit) that your class is a subclass of the intended superclass. To be truly anal, also assert that the superclass has a method with the same name as the subclass's meth

[rspec-users] Date comparisons

2008-05-03 Thread Joe Van Dyk
I occasionally get this error: 1) 'A puzzle once featured, should no longer be nominated' FAILED expected: Sun May 04 09:10:26 -0700 2008, got: Sun May 04 09:10:26 -0700 2008 (using ==) ./spec/models/puzzle_spec.rb:180: So, the dates looks the same to me. Any ideas for how to debug? Joe

Re: [rspec-users] Date comparisons

2008-05-03 Thread Steve Downey
I've seen that one too. Maybe has to do with how equality is defined in the Time or DateTime class. I get around it by comparing the string-ified versions: foo.time.to_s.should == expected_time.to_s On Sat, May 3, 2008 at 9:17 AM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > I occasionally get

[rspec-users] Any news on the rSpec books?

2008-05-03 Thread Michael Schuerig
I admit it, when it comes to rSpec, I'm lazy. I've made a few feeble attempts to use it, but for once I'm waiting for a book-length treatment. At least two books were announced, I think. Can anyone in the know please report on their progress? Thanks Michael -- Michael Schuerig mailto:[EMAIL

Re: [rspec-users] Any news on the rSpec books?

2008-05-03 Thread Steve Downey
I sent an inquiry to Prag Bookshelf but didn't hear anything -- saw something online that led me to believe they were the publisher. PeepCode has several RSpec screencasts. On Sat, May 3, 2008 at 10:06 AM, Michael Schuerig <[EMAIL PROTECTED]> wrote: > > I admit it, when it comes to rSpec, I'm la

Re: [rspec-users] Any news on the rSpec books?

2008-05-03 Thread David Chelimsky
There are three I know about, one of which I'm working on (Prag Bookshelf). I can tell you the one I'm working on will be in beta sometime in the next few months, but I can't really be any more specific than that right now. I can assure you that as things get more specific I'll be blogging

Re: [rspec-users] Date comparisons

2008-05-03 Thread Rick DeNatale
On Sat, May 3, 2008 at 12:17 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > I occasionally get this error: > > 1) > 'A puzzle once featured, should no longer be nominated' FAILED > expected: Sun May 04 09:10:26 -0700 2008, > got: Sun May 04 09:10:26 -0700 2008 (using ==) > ./spec/models/puzz

Re: [rspec-users] Date comparisons

2008-05-03 Thread Steve Downey
> > Just because too objects have the same to_s representation don't mean > they are equal: The important equality in this case is what matters to the tester. > > This is a similar issue to Floats where there's more precision than > the exernal representation shows. > Is there more precision t

Re: [rspec-users] Date comparisons

2008-05-03 Thread Kyle Hargraves
On Sat, May 3, 2008 at 1:12 PM, Steve Downey <[EMAIL PROTECTED]> wrote: > Is there more precision than seconds in a Time instance? > > irb(main):006:0> a,b = Time.now, Time.now > => [Sat May 03 11:06:31 -0700 2008, Sat May 03 11:06:31 -0700 2008] > irb(main):007:0> puts a.to_i, b.to_i > 1209837991

[rspec-users] Everyone Using Rspec Autotest?

2008-05-03 Thread Andrew Brown
I haven't been spec'ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Scott and there was mention of rspec_autotest. Is this is what everyone is using? http://svn.caldersphere.net/svn/main/plugins/rspe

Re: [rspec-users] Everyone Using Rspec Autotest?

2008-05-03 Thread Jarkko Laine
On 3.5.2008, at 22.18, Andrew Brown wrote: I haven't been spec'ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Scott and there was mention of rspec_autotest. Is this is what everyone is using?

Re: [rspec-users] Everyone Using Rspec Autotest?

2008-05-03 Thread Andrew Brown
I will, once I resolve the error. On 3-May-08, at 3:21 PM, Jarkko Laine wrote: On 3.5.2008, at 22.18, Andrew Brown wrote: I haven't been spec'ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Sco

[rspec-users] silly partial qu

2008-05-03 Thread steven shingler
hi all, i'm just trying to check a partial has been rendered, by using: response.template.should_receive(:render).with(:partial => "tasks/list") this passes, even if I put something bogus in the partial name, such as: response.template.should_receive(:render).with(:partial => "___tassdfsdfks/list

Re: [rspec-users] Everyone Using Rspec Autotest?

2008-05-03 Thread Scott Taylor
On May 3, 2008, at 3:18 PM, Andrew Brown wrote: I haven't been spec'ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Scott and there was mention of rspec_autotest. Is this is what everyone is usi

Re: [rspec-users] spec'ing calls to super (or other Ruby keywords)

2008-05-03 Thread Scott Taylor
On May 3, 2008, at 11:09 AM, Al Chou wrote: In the particular case of super, another approach, though perhaps not using the spec framework, would be to assert (a la Test::Unit) that your class is a subclass of the intended superclass. To be truly anal, also assert that the superclass has

Re: [rspec-users] Date comparisons

2008-05-03 Thread Scott Taylor
On May 3, 2008, at 2:16 PM, Kyle Hargraves wrote: On Sat, May 3, 2008 at 1:12 PM, Steve Downey <[EMAIL PROTECTED]> wrote: Is there more precision than seconds in a Time instance? irb(main):006:0> a,b = Time.now, Time.now => [Sat May 03 11:06:31 -0700 2008, Sat May 03 11:06:31 -0700 2008] irb

Re: [rspec-users] BDD/Rails/Shoulda

2008-05-03 Thread Scott Taylor
On May 3, 2008, at 11:07 AM, John D. Hume wrote: Even when working test/spec-first, when I'm pairing with someone who isn't experienced working that way, I find myself constantly saying "I'm pretty sure we don't need that yet." (I've just written the spec my pair is trying to get passing,

Re: [rspec-users] Everyone Using Rspec Autotest?

2008-05-03 Thread Andrew Brown
Thanks Scott that fixed it. Forgot to do the obvious. On 3-May-08, at 4:44 PM, Scott Taylor wrote: On May 3, 2008, at 3:18 PM, Andrew Brown wrote: I haven't been spec'ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I a

Re: [rspec-users] silly partial qu

2008-05-03 Thread Rick DeNatale
On Sat, May 3, 2008 at 4:08 PM, steven shingler <[EMAIL PROTECTED]> wrote: > hi all, > > i'm just trying to check a partial has been rendered, by using: > response.template.should_receive(:render).with(:partial => "tasks/list") > > this passes, even if I put something bogus in the partial name,

Re: [rspec-users] spec'ing calls to super (or other Ruby keywords)

2008-05-03 Thread Al Chou
Funny, I mostly like writing RSpec specs for Rails, aside from the fact that it sometimes takes me a while to figure out exactly how and what I need to write to specify what I want to specify. In any case, I agree that the spec should specify what the method achieves, not the fact that the meth

Re: [rspec-users] BDD/Rails/Shoulda

2008-05-03 Thread David Chelimsky
On May 3, 2008, at 4:01 PM, Scott Taylor wrote: I remember a joke that Aslak mentioned a while back ago on this list: He had a friend (or co-worker) who wanted to write a tool which would delete every line of code which didn't get covered with rcov. I found that remark funny because Aslak d