diff options
author | Brock Trappitt <brock.trappitt@gmail.com> | 2014-05-28 08:28:54 +0800 |
---|---|---|
committer | Brock Trappitt <brock.trappitt@gmail.com> | 2014-05-28 08:28:54 +0800 |
commit | b1bf89cb77b05e9c38fc922e796caa47daa3af86 (patch) | |
tree | 64d09e62d8382db4000ea22873ab8e44c4c6a3cd | |
parent | c28e9efde7e0c384b5f959e6eb48fa47d073227e (diff) | |
download | rails-b1bf89cb77b05e9c38fc922e796caa47daa3af86.tar.gz rails-b1bf89cb77b05e9c38fc922e796caa47daa3af86.tar.bz2 rails-b1bf89cb77b05e9c38fc922e796caa47daa3af86.zip |
Asserting on error message
-rw-r--r-- | test/visitors/test_to_sql.rb | 5 |
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 |