Add Recipe::DSL#{code,block} attribute readers

This commit is contained in:
Thibault Jouan committed 2014-01-20 01:47:19 +00:00
1 parent 2d9c84d04e
commit 42a82c9c80
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -22,13 +22,13 @@ module Producer::Core
subject(:dsl) { described_class.new(env, code) }
it 'assigns the string of code' do
expect(dsl.instance_eval { @code }).to eq code
expect(dsl.code).to eq code
end
end
context 'when a code block is given as argument' do
it 'assigns the code block' do
expect(dsl.instance_eval { @block }).to be code
expect(dsl.block).to be code
end
end
end