Displaying 3 results from an estimated 3 matches for "omenking".
Did you mean:
amending
2007 Oct 08
6
spec''in controllers request for nested routes
...response.should render_template(''index'')
end
end
1)
ActiveRecord::RecordNotFound in ''PlayersController 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/con...
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))
2007 Oct 05
13
spec''ing view render partial collection, local variable not found
I''m trying to spec out a render partial collection but I get the following
error
2)
NoMethodError in ''/games/_game.rhtml should show game name''
undefined method `body'' for #<#<Class:0x316580c>:0x2f1154c>
/Volumes/EXTERNAL/web/omenking.ca/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb:12:in
`matches?''
./spec/views/games/_game.rhtml_spec.rb:39:
def before
game = mock_model(Game,
:name => ''The Battle for Blaze'',
:salt_grains => 5000000,
:people => 5000...