diff options
Diffstat (limited to 'activesupport/test/rescuable_test.rb')
-rw-r--r-- | activesupport/test/rescuable_test.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/activesupport/test/rescuable_test.rb b/activesupport/test/rescuable_test.rb index e42e6d2973..18e1b261e9 100644 --- a/activesupport/test/rescuable_test.rb +++ b/activesupport/test/rescuable_test.rb @@ -1,4 +1,4 @@ -require 'abstract_unit' +require "abstract_unit" class WraithAttack < StandardError end @@ -28,8 +28,8 @@ class Stargate rescue_from WraithAttack, :with => :sos - rescue_from 'NuclearExplosion' do - @result = 'alldead' + rescue_from "NuclearExplosion" do + @result = "alldead" end rescue_from MadRonon do |e| @@ -37,7 +37,7 @@ class Stargate end rescue_from WeirdError do - @result = 'weird' + @result = "weird" end def dispatch(method) @@ -63,7 +63,7 @@ class Stargate ronanize rescue # This is the exception we'll handle that doesn't have a cause. - raise 'unhandled RuntimeError with a handleable cause' + raise "unhandled RuntimeError with a handleable cause" end def weird @@ -77,11 +77,11 @@ class Stargate end def sos - @result = 'killed' + @result = "killed" end def sos_first - @result = 'sos_first' + @result = "sos_first" end end @@ -93,7 +93,7 @@ class CoolStargate < Stargate rescue_from CoolError, :with => :sos_cool_error def sos_cool_error - @result = 'sos_cool_error' + @result = "sos_cool_error" end end @@ -106,22 +106,22 @@ class RescuableTest < ActiveSupport::TestCase def test_rescue_from_with_method @stargate.dispatch :attack - assert_equal 'killed', @stargate.result + assert_equal "killed", @stargate.result end def test_rescue_from_with_block @stargate.dispatch :nuke - assert_equal 'alldead', @stargate.result + assert_equal "alldead", @stargate.result end def test_rescue_from_with_block_with_args @stargate.dispatch :ronanize - assert_equal 'dex', @stargate.result + assert_equal "dex", @stargate.result end def test_rescue_from_error_dispatchers_with_case_operator @stargate.dispatch :weird - assert_equal 'weird', @stargate.result + assert_equal "weird", @stargate.result end def test_rescues_defined_later_are_added_at_end_of_the_rescue_handlers_array @@ -138,6 +138,6 @@ class RescuableTest < ActiveSupport::TestCase def test_rescue_falls_back_to_exception_cause @stargate.dispatch :fall_back_to_cause - assert_equal 'unhandled RuntimeError with a handleable cause', @stargate.result + assert_equal "unhandled RuntimeError with a handleable cause", @stargate.result end end |