Skip to content

Commit

Permalink
Generate a build with known times for the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Meyers committed Mar 14, 2012
1 parent 1860ce6 commit 4efc575
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/unit/build_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4efc575

Please sign in to comment.