Add Task#initialize spec
This commit is contained in:
parent
dff95b2c4b
commit
8123cf5052
@ -6,6 +6,16 @@ module Producer::Core
|
|||||||
let(:block) { proc { } }
|
let(:block) { proc { } }
|
||||||
subject(:task) { Task.new(name, &block) }
|
subject(:task) { Task.new(name, &block) }
|
||||||
|
|
||||||
|
describe '#initialize' do
|
||||||
|
it 'assigns the name' do
|
||||||
|
expect(task.instance_eval { @name }).to eq name
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'assigns the block' do
|
||||||
|
expect(task.instance_eval { @block }).to be block
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#name' do
|
describe '#name' do
|
||||||
it 'returns its name' do
|
it 'returns its name' do
|
||||||
expect(task.name).to eq name
|
expect(task.name).to eq name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user