search for: players_controller_spec

Displaying 2 results from an estimated 2 matches for "players_controller_spec".

2007 Oct 08
6
spec''in controllers request for nested routes
...handling GET /saltmines/games/1/players should be successful'' Couldn''t find Game with ID=#<Spec::Mocks::Mock:0x2ffcde4> /Volumes/EXTERNAL/web/omenking.ca/config/../app/controllers/players_controller.rb:5:in `index'' /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:71:in `do_get'' /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:75: /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:63: I''m passing teh game_id in the request shouldn''t this be enough? -------------- next part...
2007 Oct 05
7
Easy AR association stubbing
I''ve added a method to the mock class that makes it pretty easy to stub associations in rails. I''ve been using it for awhile and it seems to cut down on a lot of setup code for the controller and model specs that use associations. #before @person = mock_model(Person) posts = mock(''post_proxy'') posts.stub!(:build).and_return(mock_model(Post, :save => true))