Change CLI#recipe as read-only attribute
This commit is contained in:
parent
a7dde5afce
commit
b67a32d27e
@ -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?
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user