spec/command/plugins/create_spec.rb in claide-plugins-0.9.1 vs spec/command/plugins/create_spec.rb in claide-plugins-0.9.2
- old
+ new
@@ -82,22 +82,23 @@
@command = create_command('danger-banana')
template_repo = 'https://github.com/danger/' \
'danger-plugin-template'
git_command = ['clone', template_repo, 'danger-banana']
- @command.expects(:git!).with(git_command)
- @command.expects(:configure_template)
+ CLAide::TemplateRunner.any_instance.expects(:git!).with(git_command)
+ CLAide::TemplateRunner.any_instance.expects(:configure_template)
@command.run
UI_OUT.string.should.include('Creating `danger-banana` plugin')
end
it 'should download the passed in template repository' do
alt_repo = 'https://github.com/danger/' \
'danger-banana-plugin-template'
@command = create_command('danger-banana', alt_repo)
- @command.expects(:git!).with(['clone', alt_repo, 'danger-banana'])
- @command.expects(:configure_template)
+ git_command = ['clone', alt_repo, 'danger-banana']
+ CLAide::TemplateRunner.any_instance.expects(:git!).with(git_command)
+ CLAide::TemplateRunner.any_instance.expects(:configure_template)
@command.run
UI_OUT.string.should.include('Creating `danger-banana` plugin')
end
end
end