Re: [rspec-users] testing against a live environment

2010-04-30 Thread Martin DeMello
perfect :) martin On Thu, Apr 29, 2010 at 8:10 PM, Joaquin Rivera Padron joahk...@gmail.com wrote: maybe then check http://github.com/cavalle/steak joaquin 2010/4/29 Martin DeMello martindeme...@gmail.com On Tue, Apr 27, 2010 at 3:32 PM, Matt Wynne m...@mattwynne.net wrote: Should be

[rspec-users] Good practices on spec'ing views?

2010-04-30 Thread Stefan Kanev
Hey guys. I've been doing RSpec for more than a year by now, yet I cannot help but feel that I've never got a single view spec right. I can see that I have very few view specs and that my views tend be a lot messier than everything else. I've read the chapter in the RSpec book about spec'ing

Re: [rspec-users] Good practices on spec'ing views?

2010-04-30 Thread Rick DeNatale
On Fri, Apr 30, 2010 at 4:26 AM, Stefan Kanev stefan.ka...@gmail.com wrote: Hey guys. I've been doing RSpec for more than a year by now, yet I cannot help but feel that I've never got a single view spec right. I can see that I have very few view specs and that my views tend be a lot messier

Re: [rspec-users] Future of RSpec Integration Testing

2010-04-30 Thread Steve Klabnik
Integration testing is also known as full-stack testing. Basically, you're not testing isolated parts of the system, but the system as a whole. Cucumber is integration testing. rspec with 'integrate_views' is integration testing. ___ rspec-users mailing

Re: [rspec-users] Running code on error

2010-04-30 Thread Ryan S
Well, I am using SauceOnDemand with rspec. So when a test fails I want to download the video that corresponds to the failing test. I figured I could do a: it should download video do begin #some failing test here rescue Exception = e #download video raise e end end But this

Re: [rspec-users] Future of RSpec Integration Testing

2010-04-30 Thread David Chelimsky
On Apr 30, 2010, at 9:36 AM, Steve Klabnik wrote: Integration testing is also known as full-stack testing. This is true in the Rails world but it is far from a universal truth. Before Rails came around, integration testing (testing the integration between two or more non-trivial components)

Re: [rspec-users] Running code on error

2010-04-30 Thread Ben Mabey
Ryan S wrote: Well, I am using SauceOnDemand with rspec. So when a test fails I want to download the video that corresponds to the failing test. I figured I could do a: it should download video do begin #some failing test here rescue Exception = e #download video raise e end

[rspec-users] multiple return values with stub

2010-04-30 Thread Phillip Koebbe
I have a helper method def login_as(role) user = stub_model(User) user.stub(:is_administrator?).and_return(role == :admin) User.stub(:find_by_id).and_return(user) session[:user_id] = user.id user end which has been dandy until yesterday. I am now

Re: [rspec-users] multiple return values with stub

2010-04-30 Thread Phillip Koebbe
On 2010-04-30 11:34 AM, Phillip Koebbe wrote: I have a helper method def login_as(role) user = stub_model(User) user.stub(:is_administrator?).and_return(role == :admin) User.stub(:find_by_id).and_return(user) session[:user_id] = user.id user end

Re: [rspec-users] multiple return values with stub

2010-04-30 Thread David Chelimsky
On Apr 30, 2010, at 11:34 AM, Phillip Koebbe wrote: I have a helper method def login_as(role) user = stub_model(User) user.stub(:is_administrator?).and_return(role == :admin) User.stub(:find_by_id).and_return(user) session[:user_id] = user.id user

[rspec-users] update_attributes fails in rake spec but not in script/spec???

2010-04-30 Thread Patrick J. Collins
Hi, So I just wrote a spec, and tested it by running script/spec models/result_list_spec.rb I get: - . Finished in 28.558841 seconds 5 examples, 0 failures - So then I did: rake spec and I get a bunch of errors on that same file