Sha256: e6502a25f8dc98d0c4fc528bf83a24d7d7e4f9d458a3048032d88d24a7919200
Contents?: true
Size: 589 Bytes
Versions: 34
Compression:
Stored size: 589 Bytes
Contents
require File.join(File.dirname(File.expand_path(__FILE__)), "spec_helper") describe "from_block extension" do before do @db = Sequel.mock @db.extension(:from_block) end it "should make Database#from blocks apply to FROM" do @db.from{f}.sql.must_equal 'SELECT * FROM f' @db.from{[f, g(f)]}.sql.must_equal 'SELECT * FROM f, g(f)' end it "should handle from blocks with method arguments" do @db.from(:f){g(f)}.sql.must_equal 'SELECT * FROM f, g(f)' end it "should handle from without block" do @db.from(:f).sql.must_equal 'SELECT * FROM f' end end
Version data entries
34 entries across 32 versions & 2 rubygems