spec/support/examples/actor_class.rb in celluloid-0.18.0.pre vs spec/support/examples/actor_class.rb in celluloid-0.18.0.pre2
- old
+ new
@@ -43,11 +43,11 @@
def run_on_receiver(*args)
yield(*args)
end
def crash
- fail ExampleCrash, "the spec purposely crashed me :("
+ raise ExampleCrash, "the spec purposely crashed me :("
end
def crash_with_abort(reason, foo = nil)
example_crash = ExampleCrash.new(reason)
example_crash.foo = foo
@@ -87,15 +87,11 @@
super
end
end
def respond_to?(method_name, include_private = false)
- if delegates?(method_name)
- delegates?(method_name)
- else
- super
- end
+ delegates?(method_name) || super
end
def method(method_name)
if delegates?(method_name)
@delegate.method(method_name)
@@ -112,11 +108,10 @@
@private_called = true
end
private :zomg_private
attr_reader :private_called
- def my_finalizer
- end
+ def my_finalizer; end
private
def delegates?(method_name)
return false unless @delegate ||= nil