aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-09-22 11:01:03 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-09-22 11:01:03 -0700
commitb57a11cb8abfca345f63084ce841c6f412c1156e (patch)
treec58702c92ba90e121a4556bc4053a0e6b790873f /test
parentc903c6b28933a041d42d943c6c83f98aaa81f42a (diff)
downloadrails-b57a11cb8abfca345f63084ce841c6f412c1156e.tar.gz
rails-b57a11cb8abfca345f63084ce841c6f412c1156e.tar.bz2
rails-b57a11cb8abfca345f63084ce841c6f412c1156e.zip
move the dispatch table to be per-instance
visitors are not shared among threads, so any mutations to the cache should be OK. The cache is also pre-populated on construction, but we should pull that out so we can share the cache among visitors in the future.
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_bind_visitor.rb6
-rw-r--r--test/visitors/test_to_sql.rb2
2 files changed, 1 insertions, 7 deletions
diff --git a/test/visitors/test_bind_visitor.rb b/test/visitors/test_bind_visitor.rb
index 5171bbe57c..333636ed51 100644
--- a/test/visitors/test_bind_visitor.rb
+++ b/test/visitors/test_bind_visitor.rb
@@ -35,9 +35,6 @@ module Arel
def test_visitor_yields_on_binds
visitor = Class.new(Arel::Visitors::ToSql) {
- def initialize omg
- end
-
include Arel::Visitors::BindVisitor
}.new nil
@@ -49,9 +46,6 @@ module Arel
def test_visitor_only_yields_on_binds
visitor = Class.new(Arel::Visitors::ToSql) {
- def initialize omg
- end
-
include Arel::Visitors::BindVisitor
}.new(nil)
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index b495c4d994..195566902b 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -29,7 +29,7 @@ module Arel
end
def dispatch
- { Arel::Table => 'hello' }
+ { Arel::Table.name => 'hello' }
end
}.new