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,15 +1,15 @@
require_relative '../minimal_test_helper'
require_relative '../../lib/staleness'
FakeUser = Struct.new(:time, :prefs)
FakePrefs = Struct.new(:staleness_starts)
FakeTask = Struct.new(:due, :completed, :created_at) do
class StalenessTest < Test::Unit::TestCase
FakeUser = Struct.new(:time, :prefs)
FakePrefs = Struct.new(:staleness_starts)
FakeTask = Struct.new(:due, :completed, :created_at) do
def completed?
self.completed
end
end
class StalenessTest < Test::Unit::TestCase
end
def now
@now ||= Time.utc(2013, 2, 28, 0, 0, 0)