I am trying to return "true" if the speed is under 40 or over 60, and false otherwise.
Here's my code:
def not_safe?(speed)
if speed < 40 || speed > 60 ? true : false
end
end
and here's the error:
Failure/Error: expect(answer).to eq(false)
expected: false
got: nil
(compared using ==)
I tried putting each argument within parenthesis, as well as using "true" and "false" as strings.