Change CLI#recipe as read-only attribute

This commit is contained in:
Thibault Jouan 2014-01-09 01:16:13 +00:00
parent a7dde5afce
commit b67a32d27e
2 changed files with 2 additions and 3 deletions

View File

@ -19,8 +19,7 @@ module Producer
end
end
attr_reader :arguments, :stdout
attr_accessor :recipe
attr_reader :arguments, :stdout, :recipe
def initialize(arguments, stdout: $stdout)
raise ArgumentError unless arguments.any?

View File

@ -72,7 +72,7 @@ module Producer::Core
describe '#recipe' do
it 'returns the assigned recipe' do
recipe = double 'recipe'
cli.recipe = recipe
cli.instance_eval { @recipe = recipe }
expect(cli.recipe).to be recipe
end
end