Sha256: 38afbaa9b406da6199eb312e2b42205efad3fcccf5ce233e0337909c56dfea73
Contents?: true
Size: 788 Bytes
Versions: 45
Compression:
Stored size: 788 Bytes
Contents
require_relative "spec_helper" if (RUBY_VERSION >= '2.0.0' && RUBY_ENGINE == 'ruby') || (RUBY_VERSION >= '2.3.0' && RUBY_ENGINE == 'jruby') Sequel.extension :symbol_aref_refinement using Sequel::SymbolAref describe "symbol_aref_refinement extension" do before do @db = Sequel.mock end it "Symbol#[] should create qualified identifier if given a symbol" do @db.literal(:x[:y]).must_equal "x.y" end it "Symbol#[] should create qualified identifier if given an identifier" do @db.literal(:x[Sequel[:y]]).must_equal "x.y" end it "Symbol#[] should create qualified identifier if given a qualified identifier" do @db.literal(:x[:y[:z]]).must_equal "x.y.z" end it "should not affect other arguments to Symbol#[]" do :x[0].must_equal "x" end end end
Version data entries
45 entries across 41 versions & 2 rubygems