Sha256: 3e79792c94f2973e6d260ab9f21300eec679b5d90fc553c1bc18a09f5601cf2f
Contents?: true
Size: 936 Bytes
Versions: 12
Compression:
Stored size: 936 Bytes
Contents
describe "Fortitude method precedence", :type => :system do it "should have widget methods > need methods > helper methods > tag methods" do helpers_class = Class.new do def foo "helper_foo" end def bar "helper_bar" end def baz "helper_baz" end def quux "helper_quux" end end helpers_object = helpers_class.new wc = widget_class do tag :foo tag :bar tag :baz tag :quux helper :foo, :bar, :baz needs :foo => 'need_foo', :bar => 'need_bar' def foo "method foo" end def content text "foo: #{foo}, " text "bar: #{bar}, " text "baz: #{baz}, " quux end end expect(render(wc, :rendering_context => rc( :helpers_object => helpers_object))).to eq("foo: method foo, bar: need_bar, baz: helper_baz, <quux></quux>") end end
Version data entries
12 entries across 12 versions & 1 rubygems