Move the fakes so that they're namespaced by the test

Prevents errors since the names clash with names used in other tests.
This commit is contained in:
Matt Rogers 2013-03-09 22:28:25 -06:00
parent ccf5323588
commit 8ffe3cacca

View file

@ -1,6 +1,8 @@
require_relative '../minimal_test_helper'
require_relative '../../lib/staleness'
class StalenessTest < Test::Unit::TestCase
FakeUser = Struct.new(:time, :prefs)
FakePrefs = Struct.new(:staleness_starts)
FakeTask = Struct.new(:due, :completed, :created_at) do
@ -9,8 +11,6 @@ FakeTask = Struct.new(:due, :completed, :created_at) do
end
end
class StalenessTest < Test::Unit::TestCase
def now
@now ||= Time.utc(2013, 2, 28, 0, 0, 0)
end