Nick Hoffman wrote:
> Hey guys. I've told one of my controllers to not render a layout for a
> certain action:
> layout false, :only => :map_info_window
>
> Now I'm trying to spec that, but this:
> it 'should not render a layout' do
> controller.expect_render :layout
> do_get
> end
>
> fails with this:
> Spec::Mocks::MockExpectationError in 'PropertiesController handling
> GET /properties/1/map_info_window should not render a layout'
> Mock 'expect_render_mock_proxy' expected :render with (:layout) once,
> but received it 0 times
>
> I'm using RSpec v1.1.4 . I know it's old, but I haven't gotten around
> to upgrading yet!
> -Nick
Try:
controller.should_receive(:layout).with(false, {:only =>
:map_info_window})
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users