Sha256: a68fd9bb1c0d861f8a53fd4158006c6d25b176a2e13179183f96a1d19c1d7be9

Contents?: true

Size: 847 Bytes

Versions: 8

Compression:

Stored size: 847 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

8 entries across 8 versions & 1 rubygems

Version Path
rake-funnel-0.9.1.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.9.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.8.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.7.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.6.1.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.6.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.5.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb
rake-funnel-0.4.0.pre spec/rake/funnel/integration/teamcity/teamcity_spec.rb