Re: [rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Zach Dennis
On Dec 29, 2007 1:29 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > On Dec 28, 2007 11:00 PM, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I was looking over some of my specs. > > I was thinking that the following: > > > > @game.should_receive(:name).and_return('The Battle for Blaze') > > @game.sh

Re: [rspec-users] Mocks? Really?

2007-12-29 Thread Zach Dennis
On Dec 29, 2007 5:46 PM, Francis Hwang <[EMAIL PROTECTED]> wrote: > I don't know if anyone else will find this thought useful, but: > > > I think different programmers have different situations, and they > often force different sorts of priorities. I feel like a lot of the > talk about mocking -- p

[rspec-users] should send_email always succeeds?

2007-12-29 Thread s.ross
I wrote the following in my spec: emails = ActionMailer::Base.deliveries emails.length.should eql(2) response.should send_email { with_tag('tr', @contact_info[:full_name]) } knowing that 1) an email is being sent; and 2) the contact info is in a 'p' tag and only in a

Re: [rspec-users] Mocks? Really?

2007-12-29 Thread Francis Hwang
I don't know if anyone else will find this thought useful, but: I think different programmers have different situations, and they often force different sorts of priorities. I feel like a lot of the talk about mocking -- particularly as it hedges into discussions of modeling, design as part o

Re: [rspec-users] Mocks? Really?

2007-12-29 Thread David Chelimsky
Hi all - I've been keeping an eye on this thread and I've just been too busy with holiday travel and book writing to participate as I would like. I'm just going to lay out some thoughts in one fell swoop rather than going back through and finding all the quotes. Hope that works for you. First - "

Re: [rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Gaston Ramos
El sáb, 29 de dic de 2007, a las 02:00:25 -0500, Andrew WC Brown dijo: > I was looking over some of my specs. > I was thinking that the following: > > @game.should_receive(:name).and_return('The Battle for Blaze') > @game.should_receive(:people).and_return(500) > @game.should_receive(:activate

Re: [rspec-users] Do you think it would look cleaner?

2007-12-29 Thread David Chelimsky
On Dec 29, 2007 6:00 PM, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > I just see these large blocks of: > > @shopping_list.should_receive(:milk)..and_return('milk') > @shopping_list.should_receive(:bagel).and_return('bagel') > @shopping_list.should_receive(:coffee).and_return('coffee') > > and it

Re: [rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Andrew WC Brown
eg. I'm going to the store to buy one milk I'm going to the store to buy one bagel I'm going to the store to buy one coffee @shopping_list.should_receive(:milk).once.and_return('milk') @shopping_list.should_receive(:bagel).once.and_return('bagel') @shopping_list.should_receive(:coffee).once.and_re

Re: [rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Pat Maddox
On Dec 28, 2007 11:00 PM, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > I was looking over some of my specs. > I was thinking that the following: > > @game.should_receive(:name).and_return('The Battle for Blaze') > @game.should_receive(:people).and_return(500) > @game.should_receive (:activated)

[rspec-users] ./script/story command

2007-12-29 Thread Bryan Helmkamp
Below I've pasted a ./script/story command I've been using for about a week. It has three modes of operation: 1. ./script/story with no arguments will run all *.story files in the story path 2. ./script/story with a path or glob will run the specified stories 3. If input is passed in via STDIN, it

Re: [rspec-users] RSpec on Ruby 1.9: before(:all) (Not Yet Implemented) pending messages instead of tests

2007-12-29 Thread Luis Lavena
On Dec 29, 2007 7:44 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Dec 27, 2007 4:28 PM, Shot (Piotr Szotkowski) <[EMAIL PROTECTED]> wrote: > > > I had to patch RSpec in the below manner to get it running > > on Ruby 1.9, but I doubt these fixes can be the culprit. > > > > --- lib/spec/runner

Re: [rspec-users] RSpec on Ruby 1.9: before(:all) (Not Yet Implemented) pending messages instead of tests

2007-12-29 Thread David Chelimsky
On Dec 27, 2007 4:28 PM, Shot (Piotr Szotkowski) <[EMAIL PROTECTED]> wrote: > Hi. > > I happily hand-compiled Ruby 1.9.0-0 into /home/shot/opt/ruby today > and I'm running into a strange error with RSpec – all my examples work > perfectly with Ruby 1.8 but are considered peding on Ruby 1.9. > Pe

Re: [rspec-users] Converting to Rails 2.0.2

2007-12-29 Thread aslak hellesoy
On Dec 28, 2007 11:56 PM, s.ross <[EMAIL PROTECTED]> wrote: > I'm moving an older project to Rails 2.0.2 and ran into a roadblock on > the version matching. Here's script/console session: > > >> Spec::VERSION::REV > => "1785" > >> Spec::Rails::VERSION::REV > NoMethodError: undefined method `run='

[rspec-users] Do you think it would look cleaner?

2007-12-29 Thread Andrew WC Brown
I was looking over some of my specs. I was thinking that the following: @game.should_receive(:name).and_return('The Battle for Blaze') @game.should_receive(:people).and_return(500) @game.should_receive(:activated).and_return(true) Would it look cleaner if I could do this instead? @game.shoul