Sha256: 3a855a5f1b79a85fa8b0955b5e31dd69b0edac73c95df70e3a08e205fde7ab16
Contents?: true
Size: 735 Bytes
Versions: 25
Compression:
Stored size: 735 Bytes
Contents
require File.join(File.dirname(File.expand_path(__FILE__)), "spec_helper") describe "hash_aliases extension" do before do @ds = Sequel.mock.dataset.extension(:hash_aliases) end it "should make from treat hash arguments as alias specifiers" do @ds.from(:a=>:b).sql.should == "SELECT * FROM a AS b" end it "should not affect other arguments to from" do @ds.from(:a, :b).sql.should == "SELECT * FROM a, b" end it "should make select treat hash arguments as alias specifiers" do @ds.select(:a=>:b).sql.should == "SELECT a AS b" @ds.select{{:a=>:b}}.sql.should == "SELECT a AS b" end it "should not affect other arguments to select" do @ds.select(:a, :b).sql.should == "SELECT a, b" end end
Version data entries
25 entries across 25 versions & 2 rubygems