If you put this on your spec_helper.rb

//If you have your spec in the directory "spec/presenters"
config.include ActionView::TestCase::Behavior, example_group:
{file_path: %r{spec/presenters}}

Then you can use a method, :view, that you can use as the view context
like this

let(:profile) { ProfilePresenter.new(@user, view) }


....... There is a Railscast about it.

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to