Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/scientist/experiment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def marshal_dump
[@name, @result, @raise_on_mismatches]
end

def marshal_load
def marshal_load(array)
@name, @result, @raise_on_mismatches = array
end
end
4 changes: 4 additions & 0 deletions test/scientist/experiment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ def @ex.raised(op, exception)
assert_kind_of(String, Marshal.dump(mismatch))
end

it "can be marshal loaded" do
assert_kind_of(Fake, Marshal.load(Marshal.dump(@ex)))
end

describe "#raise_on_mismatches?" do
it "raises when there is a mismatch if the experiment instance's raise on mismatches is enabled" do
Fake.raise_on_mismatches = false
Expand Down