Sha256: 8553b4c1010c07de8df0b373fb3b380f81b29fa9daa6125c83e60f10479b962d

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 Bytes

Contents

require 'spec_helper'
require 'schedule_attributes/configuration'

describe "ScheduleAttributes" do
  describe ".configure" do
    it "yields a configuration instance" do
      ScheduleAttributes.configure do |config|
        expect(config).to be_a ScheduleAttributes::Configuration
      end
    end

    it "returns a configuration instance" do
      expect(ScheduleAttributes.configure).to be_a ScheduleAttributes::Configuration
    end
  end
end

describe ScheduleAttributes::Configuration do
  describe ".time_format" do
    it "has a default" do
      expect(subject.time_format).to eq('%H:%M')
    end

    it "is settable" do
      subject.time_format = '%l:%M %P'
      expect(subject.time_format).to eq('%l:%M %P')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dgp-schedule_attributes-0.5.3 spec/schedule_attributes/configuration_spec.rb
dgp-schedule_attributes-0.5.2 spec/schedule_attributes/configuration_spec.rb
dgp-schedule_attributes-0.5.1 spec/schedule_attributes/configuration_spec.rb
dgp-schedule_attributes-0.5.0 spec/schedule_attributes/configuration_spec.rb