Skip to content

Commit

Permalink
Adds some counting on different dates
Browse files Browse the repository at this point in the history
  • Loading branch information
elcuervo committed Oct 15, 2015
1 parent 6c17800 commit 383a08f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/minuteman_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,19 @@
end
end

test "Count a given event" do
test "count a given event" do
10.times { Minuteman.count("enter:new_landing") }

assert Counterman("enter:new_landing").day.count == 10
end

test "count events on some dates" do
day = Time.new(2015, 10, 15)
next_day = Time.new(2015, 10, 16)

5.times { Minuteman.count("drink:beer", day) }
2.times { Minuteman.count("drink:beer", next_day) }

assert Counterman("drink:beer").month(day).count == 7
assert Counterman("drink:beer").day(day).count == 5
end

0 comments on commit 383a08f

Please sign in to comment.