Sha256: 313386efabf4b925bdb964d6469b902a77e47f3810fc85188d1778abff3169a4
Contents?: true
Size: 573 Bytes
Versions: 2
Compression:
Stored size: 573 Bytes
Contents
require 'spec_helper' require 'support/string_presenter' require 'support/dummy_action_controller' describe ActionPresenter::ViewHelper do include ActionControllerHelper it 'should call default presenter if presenter class is not given' do helper.present('foobar') do |p| p.foobar end.should == 'foo' end it 'should call given presenter class' do helper.present('foobar', FoobarPresenter) do |p| p.foobar end.should == 'bar' end it 'should return nil if no block is given' do helper.present('foobar').should be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
action_presenter-1.0.2 | spec/action_presenter/view_helper_spec.rb |
action_presenter-1.0.1 | spec/action_presenter/view_helper_spec.rb |