Sha256: 51c591cdd5378c1095215e26aeca3b7364803b2ca59edfeb560a4ada9e1d34c7

Contents?: true

Size: 734 Bytes

Versions: 6

Compression:

Stored size: 734 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe RussianWorkdays::Month do
  before(:all) do
    @month = RussianWorkdays::Month.new(2014, 5)
    @holidays = %w[2014-05-01 2014-05-02 2014-05-03 2014-05-04]
    @preholidays = %w[2014-05-08]
    @works = %w[2014-05-05 2014-05-06 2014-05-06]
  end

  it "should return the right preholiday days" do
    preholidays = @month.preholidays.map(&:to_s)
    expect(preholidays).to eq(@preholidays)
  end

  it "should return the right holydays" do
    holidays = @month.holidays.map(&:to_s)
    expect(holidays).to include(*@holidays)
  end

  it "should return the right preholiday works" do
    works = @month.works.map(&:to_s)
    expect(works).to include(*@works)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
russian_workdays-2.6.0 spec/month_spec.rb
russian_workdays-2.5.0 spec/month_spec.rb
russian_workdays-2.4.0 spec/month_spec.rb
russian_workdays-2.3.0 spec/month_spec.rb
russian_workdays-2.1.0 spec/month_spec.rb
russian_workdays-2.0.0 spec/month_spec.rb