Permalink
Browse files

Generate a build with known times for the test

  • Loading branch information...
1 parent 1860ce6 commit 4efc5751ed26a7e9f1d34091b1896ce2eaefb9f8 @richmeyers committed Mar 14, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/unit/build_test.rb
View
@@ -36,8 +36,11 @@ class BuildTest < IntegrityTest
it "has a human readable duration" do
assert_match '2m',
- Build.gen(:successful).human_duration
- end
+ Build.gen(:successful,
+ :started_at => Time.mktime(2008, 12, 15, 4, 0),
+ :completed_at => Time.mktime(2008, 12, 15, 4, 2)
+ ).human_duration
+ end
test "commit data" do
build = Build.gen(:commit => Commit.gen(

0 comments on commit 4efc575

Please sign in to comment.