diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-28 15:05:37 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-28 15:05:37 -0300 |
commit | 4ffc147fa63ae6c554e151a8407d3ea0ad0a717b (patch) | |
tree | 6de44830a1eb173ba4b2c3d77d57c110a767bd6e /test/visitors/test_to_sql.rb | |
parent | 517b0e53db663e73dfd5ff9d29ee54c6c3ca1de1 (diff) | |
parent | b1bf89cb77b05e9c38fc922e796caa47daa3af86 (diff) | |
download | rails-4ffc147fa63ae6c554e151a8407d3ea0ad0a717b.tar.gz rails-4ffc147fa63ae6c554e151a8407d3ea0ad0a717b.tar.bz2 rails-4ffc147fa63ae6c554e151a8407d3ea0ad0a717b.zip |
Merge pull request #276 from brocktimus/master
Fixing method signature for unsupported visits in the ToSQL Visitor
Diffstat (limited to 'test/visitors/test_to_sql.rb')
-rw-r--r-- | test/visitors/test_to_sql.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 05e75b5e0d..65d36bc004 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -247,6 +247,11 @@ module Arel compile(Nodes.build_quoted(nil)).must_be_like "NULL" end + it "unsupported input should not raise ArgumentError" do + error = assert_raises(RuntimeError) { compile(nil) } + assert_match /\Aunsupported/, error.message + end + it "should visit_Arel_SelectManager, which is a subquery" do mgr = Table.new(:foo).project(:bar) compile(mgr).must_be_like '(SELECT bar FROM "foo")' |