search for: mock_channel

Displaying 1 result from an estimated 1 matches for "mock_channel".

2010 Jul 03
0
rspec controller test strange error: undefined method `call' for nil:NilClass
...39;'Channel was successfully created.'' redirect_to(@channel) else flash[:error] = ''Error saving Channel.'' render :action => "new" end end end -------- modifying the scaffold spec like this produces strange def mock_channel(stubs={}) @mock_channel ||= mock_model(Channel, stubs) end def mock_user(stubs={}) @mock_user ||= mock_model(User, stubs) end before(:each) do @mock_user = mock_user controller.stub(:current_user).and_return @mock_user end describe "POST create" do descr...