spec/lib/new/task_spec.rb in new-0.0.14 vs spec/lib/new/task_spec.rb in new-0.0.15
- old
+ new
@@ -17,20 +17,20 @@
end
end
describe 'instances' do
before do
- task.stub(:name).and_return(:foo_task)
+ allow(task).to receive(:name).and_return(:foo_task)
end
after do
- task.unstub(:name)
+ allow(task).to receive(:name).and_call_original
end
it 'should not merge other tasks in' do
# make sure the custom config has the extra task, and make sure it doesnt come through to the task
- expect(YAML.load(File.open(root('spec', 'fixtures', 'custom', New::CONFIG_FILE))).deep_symbolize_keys![:tasks].has_key?(:dont_include)).to be_true
- expect(task.project_options[:tasks].has_key?(:dont_include)).to be_false
+ expect(YAML.load(File.open(root('spec', 'fixtures', 'custom', New::CONFIG_FILE))).deep_symbolize_keys![:tasks].has_key?(:dont_include)).to eq true
+ expect(task.project_options[:tasks].has_key?(:dont_include)).to eq false
end
it 'should get the correct task options' do
expect(task.options).to eq({ foo: 'project', project: true, custom: true, default: true })
end