Ability to enumerate each result in report

This commit is contained in:
Michael Miller 2019-03-23 14:44:00 -06:00
parent 4d38bf3ab2
commit 4890cafefa
2 changed files with 20 additions and 0 deletions

View file

@ -44,6 +44,15 @@ describe Spectator::Report do
end
end
describe "#each" do
it "yields all results" do
results = new_results
report = Spectator::Report.new(results)
# The `#each` method is tested through `Enumerable#to_a`.
report.to_a.should eq(results)
end
end
describe "#runtime" do
it "is the expected value" do
span = Time::Span.new(10, 10, 10)