Improve small details in specs:
* Fix coding standards; * Simplify some expectations (eq instead of be matcher); * Expect identity on block instead of calling; * Change some before call as oneliners; * Avoid shadowing variable names; * Improve wording where needed.
This commit is contained in:
@@ -8,7 +8,7 @@ module Producer::Core
|
||||
subject(:condition) { Condition.new(tests) }
|
||||
|
||||
describe '.evaluate' do
|
||||
let(:env) { double('env') }
|
||||
let(:env) { double 'env' }
|
||||
let(:block) { proc { :some_condition_code } }
|
||||
|
||||
it 'delegates to DSL.evaluate' do
|
||||
@@ -20,7 +20,7 @@ module Producer::Core
|
||||
end
|
||||
|
||||
it 'returns the evaluated condition' do
|
||||
condition = double('condition')
|
||||
condition = double 'condition'
|
||||
allow(Condition::DSL).to receive(:evaluate) { condition }
|
||||
expect(Condition.evaluate(env, &block)).to be condition
|
||||
end
|
||||
|
Reference in New Issue
Block a user