2018-09-12 14:21:24 +00:00
|
|
|
# frozen_string_literal: true
|
2018-09-12 13:15:43 +00:00
|
|
|
|
2014-08-10 21:04:05 +00:00
|
|
|
RSpec.describe Mutant do
|
2014-07-06 02:23:11 +00:00
|
|
|
let(:object) { described_class }
|
|
|
|
|
2014-08-11 17:52:51 +00:00
|
|
|
describe '.ci?' do
|
|
|
|
subject { object.ci? }
|
|
|
|
|
2015-11-15 20:16:42 +00:00
|
|
|
let(:value) { instance_double(Object, 'value') }
|
2014-08-11 17:52:51 +00:00
|
|
|
|
|
|
|
before do
|
2015-11-15 20:16:42 +00:00
|
|
|
expect(ENV).to receive(:key?).with('CI').and_return(value)
|
2014-08-11 17:52:51 +00:00
|
|
|
end
|
|
|
|
|
2015-11-15 20:16:42 +00:00
|
|
|
it { should be(value) }
|
2014-08-11 17:52:51 +00:00
|
|
|
end
|
2013-12-29 23:29:58 +01:00
|
|
|
end
|