Remove unnecessary type specification

This commit is contained in:
Michael Miller 2019-02-28 15:18:56 -07:00
parent 65dd6243dd
commit 6942e70024

View file

@ -36,14 +36,14 @@ def new_unsatisfied_expectation(expected : ExpectedType = 123, actual : ActualTy
end end
def create_expectations(success_count = 1, failure_count = 0) def create_expectations(success_count = 1, failure_count = 0)
satisfied = Array(Spectator::Expectations::Expectation).new(success_count) { new_satisfied_expectation } satisfied = Array.new(success_count) { new_satisfied_expectation }
unsatisfied = Array(Spectator::Expectations::Expectation).new(failure_count) { new_unsatisfied_expectation } unsatisfied = Array.new(failure_count) { new_unsatisfied_expectation }
(satisfied + unsatisfied).shuffle (satisfied + unsatisfied).shuffle
end end
def generate_expectations(success_count = 1, failure_count = 0) def generate_expectations(success_count = 1, failure_count = 0)
satisfied = Array(Spectator::Expectations::Expectation).new(success_count) { new_satisfied_expectation } satisfied = Array.new(success_count) { new_satisfied_expectation }
unsatisfied = Array(Spectator::Expectations::Expectation).new(failure_count) { new_unsatisfied_expectation } unsatisfied = Array.new(failure_count) { new_unsatisfied_expectation }
expectations = (satisfied + unsatisfied).shuffle expectations = (satisfied + unsatisfied).shuffle
reporter = Spectator::Expectations::ExpectationReporter.new(false) reporter = Spectator::Expectations::ExpectationReporter.new(false)
expectations.each do |expectation| expectations.each do |expectation|