search for: an_instance_of

Displaying 3 results from an estimated 3 matches for "an_instance_of".

2007 Sep 25
12
Problems with expect_render
Hi there, I''ve been working with RSpec for about a week now, and the process of moving from a Test::Unit + Mocha setup to an RSpec + Mocha environment has been pretty straightforward. Except, I''m having problems with using template.expect_render. I have Mocha enabled with: > config.mock_with :mocha in spec_helper. And then I have a view spec which looks like this:
2008 Mar 08
3
should_receive(:foo).with(any_object)
Hey, I just ran into a situation where I would like to expect a method call with an argument I know and another one, which is a random number. I think mocking up the rand method is somehow ugly so I thought maybe this is the first time where I can take something from Java to Ruby ;) Java''s EasyMock mocking library knows things like "anyObject()" and "anyInteger()" in
2007 Nov 10
2
Problem with view spec - works inside the browser but spec fails with nil object
Hi, I''ve been trying to find an answer for this problem in the last couple hours, but I think no discussion was about this exact same thing. So here it goes, hope someone can help. I''m trying to spec a view which works correctly on the browser, but that generates the following error when I run "rake spec:views". ActionView::TemplateError in ''/survey/show