Sha256: 79ff2c6c8a599aaffd66ce42d47fa44da389b87f3c376c4e66d6ea8a9e42b196

Contents?: true

Size: 414 Bytes

Versions: 11

Compression:

Stored size: 414 Bytes

Contents

require 'spec_helper'
require 'spok'

describe Spok::Calendars do
  it 'loads a new calendar' do
    Spok::Calendars.add(:custom_calendar, File.expand_path('../../fixtures/custom-calendar.yml', __dir__))

    expect(Spok::Workday.restday?(Date.new(2019, 01, 25), calendar: :custom_calendar)).to eq(true)
    expect(Spok::Workday.workday?(Date.new(2019, 01, 25), calendar: :custom_calendar)).to eq(false)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spok-2.1.8 spec/lib/spok/calendars_spec.rb
spok-2.1.7 spec/lib/spok/calendars_spec.rb
spok-2.1.6 spec/lib/spok/calendars_spec.rb
spok-2.1.5 spec/lib/spok/calendars_spec.rb
spok-2.1.4 spec/lib/spok/calendars_spec.rb
spok-2.1.3 spec/lib/spok/calendars_spec.rb
spok-2.1.2 spec/lib/spok/calendars_spec.rb
spok-2.1.1 spec/lib/spok/calendars_spec.rb
spok-2.1.0 spec/lib/spok/calendars_spec.rb
spok-2.0.1 spec/lib/spok/calendars_spec.rb
spok-2.0.0 spec/lib/spok/calendars_spec.rb