Skip to content

Commit

Permalink
added test for negative arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
CheezItMan committed Jul 20, 2018
1 parent 3905147 commit 68ae76c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions clock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,18 @@
clock(11, 14, 60)
}.must_raise ArgumentError
end

it "will raise an error when given a negative argument" do
expect {
clock(-1, 14, 8)
}.must_raise ArgumentError

expect {
clock(11, -1, 8)
}.must_raise ArgumentError

expect {
clock(11, 14, -1)
}.must_raise ArgumentError
end
end

0 comments on commit 68ae76c

Please sign in to comment.