[rspec-users] mock_model named spaces not working
Andrew WC Brown
omen.king at gmail.com
Sat Sep 29 00:56:14 EDT 2007
I have a namespace called saltmines
The following will fail the spec
@player = mock_model(Saltmines::Player)
1)
ActionView::TemplateError in '/saltmines/players/index.rhtml should render
list of saltmines/players'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
On line #9 of app/views/saltmines/players/index.rhtml
6: <th>Player</th>
7: </tr>
8:
9: <% for player in @players %>
My application works but these specs fail. How do I get them to pass?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070929/12f4cf76/attachment.html
More information about the rspec-users
mailing list