Sha256: 70a46c5ed374b67274990cdac56322b932ccf8a189f6d60f0d15c69c4d45cf31

Contents?: true

Size: 783 Bytes

Versions: 3

Compression:

Stored size: 783 Bytes

Contents

require "spec_helper"

RSpec.describe <%= configuration.project_class %>::Configuration::Loader do
  subject(:loader) { described_class.with_defaults }

  let(:content) { <%= configuration.project_class %>::Configuration::Content.new }

  describe ".call" do
    it "answers default configuration" do
      expect(described_class.call).to be_a(<%= configuration.project_class %>::Configuration::Content)
    end
  end

  describe ".with_defaults" do
    it "answers default configuration" do
      expect(described_class.with_defaults.call).to eq(content)
    end
  end

  describe "#call" do
    it "answers default configuration" do
      expect(loader.call).to eq(content)
    end

    it "answers frozen configuration" do
      expect(loader.call).to be_frozen
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gemsmith-16.2.0 lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/loader_spec.rb.erb
gemsmith-16.1.0 lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/loader_spec.rb.erb
gemsmith-16.0.0 lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/loader_spec.rb.erb