Sha256: 1c83f022ea2460ed248aad7966999685484bb4dc6764fc6db99b1044a88de1c1

Contents?: true

Size: 745 Bytes

Versions: 3

Compression:

Stored size: 745 Bytes

Contents

require 'spec_helper'

RSpec.describe PolishGeeks::DevTools do
  subject { described_class }

  describe '.gem_root' do
    context 'when we want to get gem root path' do
      let(:path) { Dir.pwd }
      it do
        expect(subject.gem_root).to eq path
      end
    end
  end

  describe '.app_root' do
    context 'when we want to get app root path' do
      before do
        expect(ENV).to receive(:[]).with('BUNDLE_GEMFILE').and_return('/')
      end

      it { expect(subject.app_root).to eq '/' }
    end
  end

  describe '.setup' do
    let(:config_block) { -> {} }

    it 'passes it to Config setup method' do
      expect(described_class::Config)
        .to receive(:setup)

      subject.setup(&config_block)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polishgeeks-dev-tools-1.3.2 spec/lib/polish_geeks/dev_tools_spec.rb
polishgeeks-dev-tools-1.3.1 spec/lib/polish_geeks/dev_tools_spec.rb
polishgeeks-dev-tools-1.3.0 spec/lib/polish_geeks/dev_tools_spec.rb