Re: [rspec-users] Configuring RSpec for Integration Test

2010-12-18 Thread David Chelimsky
On Dec 18, 2010, at 5:32 PM, Sarah Allen wrote: > David Chelimsky wrote in post #969325: >> Per "Webrat and Capybara" on http://relishapp.com/rspec/rspec-rails, all >> you should need now is this in your Gemfile: >> >> gem "capybara" >> >> Cheers, >> David > > I did that, but then it didn't re

Re: [rspec-users] Configuring RSpec for Integration Test

2010-12-18 Thread Sarah Allen
David Chelimsky wrote in post #969325: > Per "Webrat and Capybara" on http://relishapp.com/rspec/rspec-rails, all > you should need now is this in your Gemfile: > > gem "capybara" > > Cheers, > David I did that, but then it didn't recognize my named route "root_path" or the capybara method "vis

Re: [rspec-users] Configuring RSpec for Integration Test

2010-12-18 Thread David Kahn
On Sat, Dec 18, 2010 at 2:47 PM, David Chelimsky wrote: > On Dec 18, 2010, at 2:11 PM, Sarah Allen wrote: > > > In using RSpec for integration testing with Capybara, I was surprised > > thave I needed to do extra configuration. I started with the config > > from this blog post: > > http://codingf

Re: [rspec-users] Configuring RSpec for Integration Test

2010-12-18 Thread David Chelimsky
On Dec 18, 2010, at 2:11 PM, Sarah Allen wrote: > In using RSpec for integration testing with Capybara, I was surprised > thave I needed to do extra configuration. I started with the config > from this blog post: > http://codingfrontier.com/integration-testing-setup-with-rspec-2-and-ca That blog

[rspec-users] Configuring RSpec for Integration Test

2010-12-18 Thread Sarah Allen
In using RSpec for integration testing with Capybara, I was surprised thave I needed to do extra configuration. I started with the config from this blog post: http://codingfrontier.com/integration-testing-setup-with-rspec-2-and-ca and I pared it down to only what I needed to write an integration

Re: [rspec-users] [Mock]How do I check order of method argument ?

2010-12-18 Thread Pat Maddox
mock.should_receive(:write).with("\n").ordered Append .ordered as above On Dec 17, 2010, at 6:12 AM, "niku -E:)" wrote: > Hello. > My name is niku. > > I'm using rspec 2.2.1 > > /tmp% rspec --version > 2.2.1 > > I tested http://gist.github.com/744935 and passed. > > /tmp% rspec stdout

Re: [rspec-users] Rspec & Rails Nested Resources

2010-12-18 Thread Pat Maddox
Try assigns(:correspondence) instead. If that doesn't work, I would inspect the value of @job.correspondences.build (when run in the test). It's possible that stub_model is causing #build to return nil -- I don't remember the behavior off the top of my head and don't have a Ruby available to che

Re: [rspec-users] Count error on lambda should change

2010-12-18 Thread Pat Maddox
Sounds like a validation failure. My guess is that you're re-using the factory-created record's attributes, and your example fails because of a uniqueness validation. This would explain the rollback if you're using the create! or save! method. Pat On Dec 13, 2010, at 3:08 PM, djangst wrote:

Re: [rspec-users] "unit" vs. "functional" specs

2010-12-18 Thread Pat Maddox
Why don't functional specs count towards your coverage metric? It sounds like you're shooting for 100% unit test coverage -- why? If you write code in order to make your functional specs pass, then that code was TDD'd...right? Pat On Dec 10, 2010, at 2:29 PM, Andrew Wagner wrote: > I went ba