Change CLI#recipe as read-only attribute

This commit is contained in:
Thibault Jouan committed 2014-01-09 01:16:13 +00:00
1 parent a7dde5afce
commit b67a32d27e
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -19,8 +19,7 @@ module Producer
end end
end end
attr_reader :arguments, :stdout attr_reader :arguments, :stdout, :recipe
attr_accessor :recipe
def initialize(arguments, stdout: $stdout) def initialize(arguments, stdout: $stdout)
raise ArgumentError unless arguments.any? raise ArgumentError unless arguments.any?
+1 -1
View File
@@ -72,7 +72,7 @@ module Producer::Core
describe '#recipe' do describe '#recipe' do
it 'returns the assigned recipe' do it 'returns the assigned recipe' do
recipe = double 'recipe' recipe = double 'recipe'
cli.recipe = recipe cli.instance_eval { @recipe = recipe }
expect(cli.recipe).to be recipe expect(cli.recipe).to be recipe
end end
end end