spec/methods_spec.rb in contracts-0.16.0 vs spec/methods_spec.rb in contracts-0.16.1
- old
+ new
@@ -34,21 +34,21 @@
o.extend(FuncTest)
end
end
it "should enforce return value inside block with no other parameter" do
- expect { obj.foo(&:to_s) }.to raise_error
+ expect { obj.foo(&:to_s) }.to raise_error ReturnContractError
end
it "should enforce return value inside block with other parameter" do
- expect { obj.foo2(2) { |x| x.to_s } }.to raise_error
+ expect { obj.foo2(2) { |x| x.to_s } }.to raise_error ReturnContractError
end
it "should enforce return value inside lambda with no other parameter" do
- expect { obj.bar lambda { |x| x.to_s } }.to raise_error
+ expect { obj.bar lambda { |x| x.to_s } }.to raise_error ReturnContractError
end
it "should enforce return value inside lambda with other parameter" do
- expect { obj.bar2(2, lambda { |x| x.to_s }) }.to raise_error
+ expect { obj.bar2(2, lambda { |x| x.to_s }) }.to raise_error ReturnContractError
end
end
end