Mocking view helpers with rspec-rails 2.0.0.beta.8
Posted
by snl
on Stack Overflow
See other posts from Stack Overflow
or by snl
Published on 2010-04-30T13:22:40Z
Indexed on
2010/04/30
13:27 UTC
Read the original article
Hit count: 173
ruby-on-rails
|rspec
I am trying to mock a view helper with rspec2. The old way of doing this throws an error, complaining the template object is not defined:
template.should_receive(:current_user).and_return(mock("user"))
Am I missing something here, or is this not implemented in rspec2 (yet)?
© Stack Overflow or respective owner