From 145f32ad8516f9654bdc469096c65549354829ab Mon Sep 17 00:00:00 2001 From: Sammy Larbi Date: Tue, 14 Jul 2015 17:17:15 -0500 Subject: Use a specific exception for unsupported visits --- test/visitors/test_to_sql.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 04fca8024b..7ae5d5b3af 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -273,9 +273,9 @@ 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) + it "unsupported input should raise UnsupportedVisitError" do + error = assert_raises(UnsupportedVisitError) { compile(nil) } + assert_match(/\AUnsupported/, error.message) end it "should visit_Arel_SelectManager, which is a subquery" do -- cgit v1.2.3