lib/spec/matchers/raise_error.rb in rspec-1.1.11 vs lib/spec/matchers/raise_error.rb in rspec-1.1.12
- old
+ new
@@ -45,23 +45,19 @@
end
def verify_message
case @expected_message
when nil
- return true
+ true
when Regexp
- return @expected_message =~ @given_error.message
+ @expected_message =~ @given_error.message
else
- return @expected_message == @given_error.message
+ @expected_message == @given_error.message
end
end
def failure_message
- if @eval_block
- return @given_error.message
- else
- return "expected #{expected_error}#{given_error}"
- end
+ @eval_block ? @given_error.message : "expected #{expected_error}#{given_error}"
end
def negative_failure_message
"expected no #{expected_error}#{given_error}"
end