Class: ODDB::TestUpdater

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
test/test_util/updater.rb

Defined Under Namespace

Classes: StubApp, StubLog, StubLogGroup

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



67
68
69
70
71
# File 'test/test_util/updater.rb', line 67

def setup
  @app = StubApp.new
  @updater = ODDB::Updater.new(@app)
  @group = @app.log_group = StubLogGroup.new
end

- (Object) test_update_bsv_no_repeats



72
73
74
75
76
77
78
# File 'test/test_util/updater.rb', line 72

def test_update_bsv_no_repeats
  today = Date.today()
  this_month = Date.new(today.year, today.month)
  @group.newest_date = this_month >> 1
  @updater.update_bsv
  assert_nil(@app.last_date)
end