[rspec-users] stale records with integration testing?

2012-02-13 Thread Patrick J. Collins
Hi, I was writing an integration test for my user signup form (with capybara), and found that my test was failing due to a validation error: "email is already taken". I'm a bit confused because I thought when I run "rspec spec/some_spec.rb", the test database would be wiped clear? Is that not th

[rspec-users] Should I use cucumber or Controller RSpecs or both?

2012-02-13 Thread Cathal Curtis
Hi All, I'd like to get some other's opinions on testing controllers. Say I have a model and I want to prevent deletion of instances of it. The controllers's destroy action simply redirects to an error page - nothing else. Lets assume the relevant views have no links or buttons to delete the inst

Re: [rspec-users] stale records with integration testing?

2012-02-13 Thread Justin Ko
On Feb 13, 2012, at 1:16 PM, Patrick J. Collins wrote: > Hi, > > I was writing an integration test for my user signup form (with > capybara), and found that my test was failing due to a validation error: > "email is already taken". I'm a bit confused because I thought when I > run "rspec spec/s

[rspec-users] requests versus cucumber

2012-02-13 Thread S Ahmed
For those of you who have used both rspec requests and cucumber, could you summarize the main differences between the two? Do they both serve the same purpose but with different implementation styles or they really aren't the same thing? I havent' used requests before, but I like the idea of bein

Re: [rspec-users] Should I use cucumber or Controller RSpecs or both?

2012-02-13 Thread Justin Ko
On Feb 13, 2012, at 3:46 PM, Cathal Curtis wrote: > Hi All, > > I'd like to get some other's opinions on testing controllers. > > Say I have a model and I want to prevent deletion of instances of it. > The controllers's destroy action simply redirects to an error page - > nothing else. > Lets a

Re: [rspec-users] Should I use cucumber or Controller RSpecs or both?

2012-02-13 Thread Cynthia Kiser
Quoting Cathal Curtis : > I want to ensure that on receipt of a DELETE request for an instance of > that model, that the application does in fact disallow the deletion and > redirects to an error page. > > Should I create a cucumber test, with a step that would call something > like: "delete url_f

Re: [rspec-users] stale records with integration testing?

2012-02-13 Thread David Chelimsky
On Mon, Feb 13, 2012 at 9:04 PM, Justin Ko wrote: > > On Feb 13, 2012, at 1:16 PM, Patrick J. Collins wrote: > >> Hi, >> >> I was writing an integration test for my user signup form (with >> capybara), and found that my test was failing due to a validation error: >> "email is already taken".  I'm