aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrock Trappitt <brock.trappitt@gmail.com>2014-05-28 08:28:54 +0800
committerBrock Trappitt <brock.trappitt@gmail.com>2014-05-28 08:28:54 +0800
commitb1bf89cb77b05e9c38fc922e796caa47daa3af86 (patch)
tree64d09e62d8382db4000ea22873ab8e44c4c6a3cd /test
parentc28e9efde7e0c384b5f959e6eb48fa47d073227e (diff)
downloadrails-b1bf89cb77b05e9c38fc922e796caa47daa3af86.tar.gz
rails-b1bf89cb77b05e9c38fc922e796caa47daa3af86.tar.bz2
rails-b1bf89cb77b05e9c38fc922e796caa47daa3af86.zip
Asserting on error message
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_to_sql.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index 5d5a351737..65d36bc004 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -248,9 +248,8 @@ module Arel
end
it "unsupported input should not raise ArgumentError" do
- assert_raises(RuntimeError) do
- compile(nil)
- end
+ error = assert_raises(RuntimeError) { compile(nil) }
+ assert_match /\Aunsupported/, error.message
end
it "should visit_Arel_SelectManager, which is a subquery" do