spec/chanko/exception_handler_spec.rb in chanko-2.0.7 vs spec/chanko/exception_handler_spec.rb in chanko-2.0.8
- old
+ new
@@ -19,11 +19,11 @@
Config.propagated_errors << Exception
end
it "raises up error without any logging" do
expect(Logger).not_to receive(:debug)
- expect { described_class.handle(error, insensitive_unit) }.to raise_error
+ expect { described_class.handle(error, insensitive_unit) }.to raise_error(error)
end
end
context "when Config.propagated_errors does not include given error" do
before do
@@ -45,16 +45,16 @@
before do
Config.raise_error = true
end
it "raises up error" do
- expect { described_class.handle(error, insensitive_unit) }.to raise_error
+ expect { described_class.handle(error, insensitive_unit) }.to raise_error(error)
end
end
context "when unit.raise_error is configured" do
it "raises up error" do
- expect { described_class.handle(error, sensitive_unit) }.to raise_error
+ expect { described_class.handle(error, sensitive_unit) }.to raise_error(error)
end
end
end
end