Sha256: bb44b7a8dd7cd2a094575177cb6de3badfed87013cafef655dfefa188e5efed2

Contents?: true

Size: 881 Bytes

Versions: 11

Compression:

Stored size: 881 Bytes

Contents

describe Rake::Funnel::Integration::TeamCity do
  before {
    allow(ENV).to receive(:include?).with(described_class::ENV_VAR).and_return(teamcity_running?)
  }

  context 'when running outside TeamCity' do
    let(:teamcity_running?) { false }

    it 'should not detect TeamCity' do
      expect(described_class.running?).to eq(false)
    end

    it "should not detect TeamCity's rake runner" do
      expect(described_class.rake_runner?).to eq(false)
    end
  end

  context 'when running inside TeamCity' do
    let(:teamcity_running?) { true }

    it 'should detect TeamCity' do
      expect(described_class.running?).to eq(true)
    end

    it "should detect TeamCity's rake runner" do
      module ::Rake
        module TeamCityApplication
        end
      end

      expect(described_class.rake_runner?).to eq(true)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rake-funnel-0.3.2.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.3.1.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.3.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.2.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.1.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.0.6.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.0.5.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.0.4.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.0.3.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.0.2.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.0.1.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb