Sha256: e66c6c4d4ea07b5f58da814219fca55955b4e16e4a9529cc15b04a1f490575c1
Contents?: true
Size: 977 Bytes
Versions: 42
Compression:
Stored size: 977 Bytes
Contents
require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "DSL bindings" do it 'should give access to calling context\'s methods in search DSL' do value = nil session.search(Post) do value = test_method end value.should == 'value' end it 'should give access to calling context\'s id method in search DSL' do value = nil session.search(Post) do value = id end value.should == 16 end it 'should give access to calling context\'s methods in nested DSL block' do value = nil session.search(Post) do any_of do value = test_method end end value.should == 'value' end it 'should give access to calling context\'s methods in double-nested DSL block' do value = nil session.search(Post) do any_of do all_of do value = test_method end end end end private def test_method 'value' end def id 16 end end
Version data entries
42 entries across 42 versions & 10 rubygems