Sha256: ba9d89bacd61c85562d9067ec4ae7500d0d083f5117213b7707fa106b20e313f
Contents?: true
Size: 527 Bytes
Versions: 4
Compression:
Stored size: 527 Bytes
Contents
shared_examples_for 'an uncached connection method' do let(:connection){ meth = connection_method Class.new(Alf::Adapter::Connection) do define_method(meth) do |*args, &bl| bl ? bl.call(args) : args end end.new(nil) } let(:cached){ Alf::Adapter::Connection::SchemaCached.new(connection) } it 'delegates the call to the connection' do args, seen = ["foo", :bar, 2], nil cached.send(connection_method, *args) do |res| seen = res end seen.should eq(args) end end
Version data entries
4 entries across 4 versions & 1 rubygems