spec/fault_injection_spec.rb in faultinjection-0.0.2 vs spec/fault_injection_spec.rb in faultinjection-0.0.3
- old
+ new
@@ -74,9 +74,23 @@
FaultInjection.inject([:Bar,:bar,:Foo,:foo],RangeError).should be_true
Proc.new{ Bar.new.bar }.should raise_error(RangeError)
end
end
+describe "'Line number in method' style fault injection" do
+ require 'target_03.rb'
+
+ it "should inject faults properly with Class#method:line format." do
+ Proc.new { T3.new.foo }.should_not raise_error
+
+ pending "not yet implemented" do
+ FaultInjection.inject("T3#foo:2",IOError)
+
+ Proc.new { T3.new.foo }.should raise_error(IOError)
+ end
+ end
+end
+
describe "Specifying Exception class" do
require 'target_01.rb'
it "can inject fault with specified Exception class" do
include FaultInjection