We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1105e41 commit 3463724Copy full SHA for 3463724
1 file changed
test/scientist/experiment_test.rb
@@ -444,6 +444,18 @@ def @ex.raised(op, exception)
444
assert_raises(Scientist::Experiment::MismatchError) { @ex.run }
445
end
446
447
+ it "allows MismatchError to bubble up through bare rescues" do
448
+ Fake.raise_on_mismatches = true
449
+ @ex.use { "control" }
450
+ @ex.try { "candidate" }
451
+ runner = -> do
452
+ @ex.run
453
+ rescue
454
+ # StandardError handled
455
+ end
456
+ assert_raises(Scientist::Experiment::MismatchError) { runner.call }
457
458
+
459
describe "#raise_on_mismatches?" do
460
it "raises when there is a mismatch if the experiment instance's raise on mismatches is enabled" do
461
Fake.raise_on_mismatches = false
0 commit comments