Sha256: 8985515670d99269ab2c3bb2cf873090c888b3a4eeeac9068a2363b4fddc4c7b

Contents?: true

Size: 685 Bytes

Versions: 11

Compression:

Stored size: 685 Bytes

Contents

RSpec.describe A9n::Scope do
  subject { described_class.new(name) }

  describe "#name" do
    let(:name) { "configuration" }
    it { expect(subject.name).to eq(:configuration) }
  end

  describe "#main?" do
    context "when name is configuration" do
      let(:name) { "configuration" }
      it { expect(subject).to be_root }
    end

    context "when name is other than configuration" do
      let(:name) { "mandrill" }
      it { expect(subject).not_to be_root }
    end
  end

  describe ".form_file_path" do
    let(:path) { "config/a9n/mandrill.yml.example" }
    subject { described_class.form_file_path(path) }

    it { expect(subject.name).to eq(:mandrill) }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
a9n-0.6.2 spec/unit/scope_spec.rb
a9n-0.6.1 spec/unit/scope_spec.rb
a9n-0.6.0 spec/unit/scope_spec.rb
a9n-0.5.7 spec/unit/scope_spec.rb
a9n-0.5.6 spec/unit/scope_spec.rb
a9n-0.5.5 spec/unit/scope_spec.rb
a9n-0.5.4 spec/unit/scope_spec.rb
a9n-0.5.2 spec/unit/scope_spec.rb
a9n-0.5.1 spec/unit/scope_spec.rb
a9n-0.5.0 spec/unit/scope_spec.rb
a9n-0.4.12 spec/unit/scope_spec.rb