Using RSpec, I want to test that certain methods are called within a method. Take the following example class:
I have several rspec tests that use Factory_girl. It is used on MongoDB with MongoId in a Rails 3 app.
How do I define a suite in rspec2.Indeed, what is a suite? I want to break my specs down into two suites and reset everything between running the two suites (clean out the test db, reset warden etc .
The error ForumsController create should work for plist Failure/Error: post :create, :name => \"My New Shiny Forum\", :format => \'plist\'
I know RSpec has useful methods \"get\" and \"response.should\" to run integration tests - I want to know how I can use these (or other methods to achieve the same result) in a Rake task:
I have an odd situation whereby if I run an individual rspec model spec file all examples are green, if I test my entire spec/models folder all my examples are green. If I test the controllers they al
Here is some sample tests from my rspec 1.x code: [:email, :contact_type_id].each do |attr| it \"requires #{attr}\" do
I\'m using Ruby 1.9.2, Rails 3.1, Rspec, Postgres and Spork, but I can\'t get them to play nic开发者_运维问答ely together.
Read a lot of materials regarding the behavior-driven testing. Indeed, as it is stated (for example) here, the specs\' code should be extremely readable, short and straightforward.
I know that in Capybara, you can do something like this: page.should have_css(\"ol li\", :count => 2)