Implement Task#to_s
This commit is contained in:
parent
7cffa34442
commit
2b86bbf112
@ -17,6 +17,10 @@ module Producer
|
||||
@condition = condition
|
||||
end
|
||||
|
||||
def to_s
|
||||
name.to_s
|
||||
end
|
||||
|
||||
def condition_met?
|
||||
!!@condition
|
||||
end
|
||||
|
@ -61,6 +61,12 @@ module Producer::Core
|
||||
end
|
||||
end
|
||||
|
||||
describe '#to_s' do
|
||||
it 'includes the task name' do
|
||||
expect(task.to_s).to include name.to_s
|
||||
end
|
||||
end
|
||||
|
||||
describe '#condition_met?' do
|
||||
context 'when condition is truthy' do
|
||||
let(:condition) { Condition.new([], true) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user