Sha256: ebd4f7747f542d05d286e31fb30b1591e0e8f350301ef42845538141aec2f94b

Contents?: true

Size: 782 Bytes

Versions: 1

Compression:

Stored size: 782 Bytes

Contents

shared_examples_for "a persistable configuration" do
  let(:klass) { described_class }

  let(:attributes) do
    {
      "whitelist" => ["FooLicense", "BarLicense"],
      "ignore_groups" => [:test, :development]
    }
  end

  describe '.new' do
    subject { klass.new(attributes) }

    context "with known attributes" do
      it "should set the all of the attributes on the instance" do
        attributes.each do |key, value|
          subject.send("#{key}").should == value
        end
      end
    end
  end

  describe "#whitelist" do
    it "should default to an empty array" do
      klass.new.whitelist.should == []
    end
  end

  describe "#ignore_groups" do
    it "should default to an empty array" do
      klass.new.ignore_groups.should == []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
license_finder-0.7.0 spec/support/shared_examples/persistence/configuration.rb