Rspec 3.0 support
This commit is contained in:
@@ -11,7 +11,7 @@ describe GitUpdater do
|
||||
describe '#is_installed?' do
|
||||
after :each do
|
||||
stub_system_command(@git_updater, /^git .* status/, @stub_value)
|
||||
@git_updater.is_installed?.should === @expected
|
||||
expect(@git_updater.is_installed?).to be === @expected
|
||||
end
|
||||
|
||||
it 'should return false if the command is not found' do
|
||||
@@ -28,7 +28,7 @@ describe GitUpdater do
|
||||
describe '#local_revision_number' do
|
||||
after :each do
|
||||
stub_system_command(@git_updater, /^git .* log/, @stub_value)
|
||||
@git_updater.local_revision_number.should === @expected
|
||||
expect(@git_updater.local_revision_number).to be === @expected
|
||||
end
|
||||
|
||||
it 'should return 79c01f3' do
|
||||
@@ -43,14 +43,14 @@ describe GitUpdater do
|
||||
describe '#update' do
|
||||
it 'should do nothing xD' do
|
||||
stub_system_command(@git_updater, /^git .* pull/, 'Already up-to-date.')
|
||||
@git_updater.update().should === 'Already up-to-date.'
|
||||
expect(@git_updater.update()).to be === 'Already up-to-date.'
|
||||
end
|
||||
end
|
||||
|
||||
describe '#has_local_changes?' do
|
||||
after :each do
|
||||
stub_system_command(@git_updater, /^git .* diff --exit-code 2>&1/, @stub_value)
|
||||
@git_updater.has_local_changes?.should === @expected
|
||||
expect(@git_updater.has_local_changes?).to be === @expected
|
||||
end
|
||||
|
||||
it 'should return true if there are local changes' do
|
||||
@@ -67,7 +67,7 @@ describe GitUpdater do
|
||||
describe '#reset_head' do
|
||||
it 'should reset the local repo' do
|
||||
stub_system_command(@git_updater, /^git .* reset --hard HEAD/, 'HEAD is now at')
|
||||
@git_updater.reset_head.should match(/^HEAD is now at/)
|
||||
expect(@git_updater.reset_head).to match(/^HEAD is now at/)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ describe SvnUpdater do
|
||||
describe '#is_installed?' do
|
||||
after :each do
|
||||
stub_system_command(@svn_updater, /^svn info/, @stub_value)
|
||||
@svn_updater.is_installed?.should === @expected
|
||||
expect(@svn_updater.is_installed?).to be === @expected
|
||||
end
|
||||
|
||||
it 'should return false if the svn command is not found' do
|
||||
@@ -50,7 +50,7 @@ describe SvnUpdater do
|
||||
describe '#local_revision_number' do
|
||||
after :each do
|
||||
stub_system_command(@svn_updater, /^svn info/, @stub_value)
|
||||
@svn_updater.local_revision_number.should === @expected
|
||||
expect(@svn_updater.local_revision_number).to be === @expected
|
||||
end
|
||||
|
||||
it 'should return 399' do
|
||||
@@ -79,7 +79,7 @@ describe SvnUpdater do
|
||||
describe '#update' do
|
||||
it 'should do nothing xD' do
|
||||
stub_system_command(@svn_updater, /^svn up/, 'At revision 425.')
|
||||
@svn_updater.update().should === 'At revision 425.'
|
||||
expect(@svn_updater.update()).to be === 'At revision 425.'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ describe UpdaterFactory do
|
||||
|
||||
describe '#available_updaters_classes' do
|
||||
after :each do
|
||||
UpdaterFactory.available_updaters_classes.sort.should === @expected.sort
|
||||
expect(UpdaterFactory.available_updaters_classes.sort).to be === @expected.sort
|
||||
end
|
||||
|
||||
it 'should return [:GitUpdater, :SvnUpdater]' do
|
||||
|
||||
Reference in New Issue
Block a user