Sha256: 077ca4a421c163eaeda756dcc0667669984e89cb1e20a378fa038fddb21895f3

Contents?: true

Size: 567 Bytes

Versions: 22

Compression:

Stored size: 567 Bytes

Contents

require 'test_helper'

# This tests our Integer working days extension
class Integer::WorkingDaysTest < Minitest::Test
  test 'Integer should be extended with #working_days_since' do
    assert 1.respond_to?(:working_days_since)
  end

  test 'Integer#working_days_since should behave correctly' do
    assert_equal Date.new(2019, 12, 23), 1.working_days_since(Date.new(2019, 12, 20))
    assert_equal Date.new(2019, 12, 27), 3.working_days_since(Date.new(2019, 12, 20))
    assert_equal Date.new(2019, 12, 30), 4.working_days_since(Date.new(2019, 12, 20))
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ndr_support-5.10.4 test/integer/working_days_test.rb
ndr_support-5.10.3 test/integer/working_days_test.rb
ndr_support-5.10.2 test/integer/working_days_test.rb
ndr_support-5.10.1 test/integer/working_days_test.rb
ndr_support-5.10.0 test/integer/working_days_test.rb
ndr_support-5.9.7 test/integer/working_days_test.rb
ndr_support-5.9.6 test/integer/working_days_test.rb
ndr_support-5.9.5 test/integer/working_days_test.rb
ndr_support-5.9.4 test/integer/working_days_test.rb
ndr_support-5.9.3 test/integer/working_days_test.rb
ndr_support-5.9.2 test/integer/working_days_test.rb
ndr_support-5.9.1 test/integer/working_days_test.rb
ndr_support-5.9.0 test/integer/working_days_test.rb
ndr_support-5.8.4 test/integer/working_days_test.rb
ndr_support-5.8.3 test/integer/working_days_test.rb
ndr_support-5.8.2 test/integer/working_days_test.rb
ndr_support-5.8.1 test/integer/working_days_test.rb
ndr_support-5.8.0 test/integer/working_days_test.rb
ndr_support-5.7.1 test/integer/working_days_test.rb
ndr_support-5.7.0 test/integer/working_days_test.rb