From ed0e8770217828b7195a90b09ec1b911132d5ced Mon Sep 17 00:00:00 2001 From: Nathan Lilienthal Date: Mon, 25 Mar 2013 14:38:39 -0400 Subject: [PATCH] comapre exception class by is_a rather then class.name == --- features/steps/httparty_response_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/steps/httparty_response_steps.rb b/features/steps/httparty_response_steps.rb index bf535da..e50dc41 100644 --- a/features/steps/httparty_response_steps.rb +++ b/features/steps/httparty_response_steps.rb @@ -22,5 +22,5 @@ end Then /it should raise (?:an|a) ([\w:]+) exception/ do |exception| @exception_from_httparty.should_not be_nil - @exception_from_httparty.class.name.should eql(exception) + @exception_from_httparty.should be_a(Object.const_get("::#{exception}")) end