Trying out rspec-rails. I get a weird error - no routes are supposedly found, even though I can access them fine in the browser when running rails s.
I am creating an object with several has_many associations. Everything with regards tob building the object works fine, but when I try to test the deletion of one of the children or parent, it does no
ThingsController: ... respond_to do |format| format.html {redirect_to(:action => \"new\", :notice => \"its a good thing!\")}# suspect...
I\'ve created a sets of specs for a controller that I have (Photo) that is a nested resource of a User.
I am doing the Michael Hartl Rails 3 Tutorial, Chapter 8.4 pages 316-320. I run the users_spec.rb test and both tests don\'t pass with the following error:
I am testing my employees_controlle开发者_如何学编程r, and in my index test for signed-in users, I am getting an error that seems to be related to my model relationships.
When writing a request spec, how do you set sessions and/or stub controller methods? I\'m trying to stub out authentication in my integration tests - rspec/requests
I am looking for successful methods for testing WebSocket push events using RSpec. My application currently uses Pusher App, but more broad information relating to WebSockets is most welcome.
I have a custom matcher: RSpec::Matchers.define :have_value do |attribute, expected| match do |obj| obj.send(attribute) == expected
Using RSpec(2.5.0) and flexmock, and i\'m finding that even if i tell a flexmocked object that it should never receive a method, my test passes anyway.