Displaying 1 result from an estimated 1 matches for "input_timesheets".
Did you mean:
input_timesheet
2008 May 20
4
mock_model not stubbing model attribtues in view spec
...ith mock_model not stubbing the mocked model''s attributes.
For instance, I have the following:
<CODE>
before do
@input_timesheet = mock_model( InputTimesheet )
assigns[:input_timesheet] = @input_timesheet
end
it "should display a table element" do
render ''/input_timesheets/edit.rhtml_spec.rb''
response.should have_tag( ''table'' )
end
</CODE>
Obviously, the view calls for a number of attributes from the
@input_timesheet, but unless I explicitly define these in the mock_model
method, I get the following kind of error:
ActionView::Tem...