Fix to make tests pass in Ruby 1.9.3
This commit is contained in:
@@ -24,23 +24,8 @@ describe Homesick::CLI do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when git is installed' do
|
|
||||||
before do
|
|
||||||
# The following line suppresses Thor warnings about overriding methods.
|
|
||||||
allow($stdout).to receive(:write).at_least(:once)
|
|
||||||
expect_any_instance_of(Homesick::Actions::GitActions).to receive(:`).and_return("git version #{Homesick::Actions::GitActions::STRING}")
|
|
||||||
end
|
|
||||||
it 'should not raise an exception' do
|
|
||||||
output = Capture.stdout{ expect{Homesick::CLI.new}.not_to raise_error }
|
|
||||||
expect(output.chomp).not_to include(Homesick::Actions::GitActions::STRING)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when git is not installed' do
|
context 'when git is not installed' do
|
||||||
before do
|
before do
|
||||||
# The following line suppresses Thor warnings about overriding methods.
|
|
||||||
allow($stdout).to receive(:write).at_least(:once)
|
|
||||||
expect_any_instance_of(Homesick::Actions::GitActions).to receive(:`).and_return("git version 1.0.0")
|
expect_any_instance_of(Homesick::Actions::GitActions).to receive(:`).and_return("git version 1.0.0")
|
||||||
end
|
end
|
||||||
it 'should raise an exception when' do
|
it 'should raise an exception when' do
|
||||||
@@ -48,6 +33,16 @@ describe Homesick::CLI do
|
|||||||
expect(output.chomp).to include(Homesick::Actions::GitActions::STRING)
|
expect(output.chomp).to include(Homesick::Actions::GitActions::STRING)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when git is installed' do
|
||||||
|
before do
|
||||||
|
expect_any_instance_of(Homesick::Actions::GitActions).to receive(:`).at_least(:once).and_return("git version #{Homesick::Actions::GitActions::STRING}")
|
||||||
|
end
|
||||||
|
it 'should not raise an exception' do
|
||||||
|
output = Capture.stdout{ expect{Homesick::CLI.new}.not_to raise_error }
|
||||||
|
expect(output.chomp).not_to include(Homesick::Actions::GitActions::STRING)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'clone' do
|
describe 'clone' do
|
||||||
|
|||||||
Reference in New Issue
Block a user