search for: expect_render_mock_proxy

Displaying 5 results from an estimated 5 matches for "expect_render_mock_proxy".

2007 Oct 23
6
Problem Upgrading from 1.0.5 to 1.0.8
...oller with a GET to /products NO NAME (Because of Error raised in matcher)'' uninitialized constant Spec::Mocks::BaseExpectation::AnyArgsConstraint /Users/mattlins/Projects/RailsProjects/SWNetworkServices/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/render_observer.rb:86:in `expect_render_mock_proxy'' /Users/mattlins/Projects/RailsProjects/SWNetworkServices/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/render_observer.rb:84:in `call'' /Users/mattlins/Projects/RailsProjects/SWNetworkServices/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/render_observer...
2007 Sep 14
5
controller.expect_render has me beat!
...;should render the "edit" config url on an unsuccessful save'' do @config.should_receive(:update_attributes).once.and_return(false) c*ontroller.expect_render( :action => :edit, :id => 1 ).once # my prob* do_update end This fails with Mock ''expect_render_mock_proxy'' expected :render with ({:action=>:edit, :id=>1}) once, but received it 0 times I have tried controller.expect_render( :action => :edit ).once Am I using #expect_render correctly? Thanks for all and any helpv Cheers! sinclair -------------- next part -------------- An HTM...
2007 Aug 13
8
How to use expect_render?
Hi: I am a rspec beginner. I have scratched my head for the whole afternoon, trying to figure out a way of writing render expectation in controller spec. However, I failed. It kept telling me that the ''expect_render'' was an undefined method. I have installed rspec 1.0.8 and rspec_on_rails as well. Below is the controller to be tested. Controller def index pre
2008 Jan 23
4
expect_render(...).and_return(''x'')
Hi, I''m trying to spec a controller method which renders some rjs as part of a render :update block. The problem I''m having is that stub_render or expect_render don''t seem to allow and_return to work. The controller method does: if @thing.save render :update do |page| page.insert_html :bottom,
2007 Sep 25
12
Problems with expect_render
...39;does_not_exist'', :object => > "hello") > render "/a/real/template" > end If I run this spec, it passes, which it really shouldn''t. If I comment out the config.mock_with :mocha line and re-run the spec, it fails with: > Mock ''expect_render_mock_proxy'' expected :render with > ({:partial=>"does_not_exist", :object=>"hello"}) once, but received > it 0 times Which is much better. So, to me, this looks like a bug in rspec_on_rails. Explanations of why I''m just doing it wrong gratefully receive...