Sha256: 27c0edb2a48ceb5e48246dff49f8975b0bc73c5b450e36c8a793008b097712fe

Contents?: true

Size: 679 Bytes

Versions: 6

Compression:

Stored size: 679 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) { 'google' }
      it { expect(subject).not_to be_root }
    end
  end

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
a9n-0.10.0 spec/unit/scope_spec.rb
a9n-0.9.1 spec/unit/scope_spec.rb
a9n-0.9.0 spec/unit/scope_spec.rb
a9n-0.8.3 spec/unit/scope_spec.rb
a9n-0.8.2 spec/unit/scope_spec.rb
a9n-0.8.0 spec/unit/scope_spec.rb