Implement `has_env' condition keyword

This commit is contained in:
Thibault Jouan
2013-08-18 20:06:36 +00:00
parent b0ea7d876e
commit 04afc82a29
6 changed files with 93 additions and 0 deletions

View File

@@ -6,6 +6,12 @@ module Producer::Core
let(:env) { double('env') }
subject(:dsl) { Condition::DSL.new(env, &block) }
%w[has_env].each do |test|
it "has `#{test}' test defined" do
expect(dsl).to respond_to test.to_sym
end
end
describe '.evaluate' do
it 'builds a new DSL sandbox with given env and code' do
expect(Condition::DSL)