Simplify Env spec:

* Remove #ouput examples;
* Use described_class where useful.
This commit is contained in:
Thibault Jouan 2014-01-19 17:58:02 +00:00
parent dd5866c04e
commit 3360356e49

View File

@ -2,7 +2,6 @@ require 'spec_helper'
module Producer::Core
describe Env do
let(:output) { double 'output' }
subject(:env) { Env.new }
describe '#initialize' do
@ -15,7 +14,8 @@ module Producer::Core
end
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
expect(env.output).to eq output
@ -23,14 +23,6 @@ module Producer::Core
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
let(:target) { double 'target' }