Simplify Env spec:
* Remove #ouput examples; * Use described_class where useful.
This commit is contained in:
parent
dd5866c04e
commit
3360356e49
@ -2,7 +2,6 @@ require 'spec_helper'
|
|||||||
|
|
||||||
module Producer::Core
|
module Producer::Core
|
||||||
describe Env do
|
describe Env do
|
||||||
let(:output) { double 'output' }
|
|
||||||
subject(:env) { Env.new }
|
subject(:env) { Env.new }
|
||||||
|
|
||||||
describe '#initialize' do
|
describe '#initialize' do
|
||||||
@ -15,7 +14,8 @@ module Producer::Core
|
|||||||
end
|
end
|
||||||
|
|
||||||
context 'when output is given as argument' do
|
context 'when output is given as argument' do
|
||||||
subject(:env) { Env.new(output: output) }
|
let(:output) { double 'output' }
|
||||||
|
subject(:env) { described_class.new(output: output) }
|
||||||
|
|
||||||
it 'assigns the given output' do
|
it 'assigns the given output' do
|
||||||
expect(env.output).to eq output
|
expect(env.output).to eq output
|
||||||
@ -23,14 +23,6 @@ module Producer::Core
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#output' do
|
|
||||||
subject(:env) { Env.new(output: output) }
|
|
||||||
|
|
||||||
it 'returns the assigned output' do
|
|
||||||
expect(env.output).to eq output
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe '#target' do
|
describe '#target' do
|
||||||
let(:target) { double 'target' }
|
let(:target) { double 'target' }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user