Commit 3965697e authored by Marin Usalj's avatar Marin Usalj

fix 1.9.3 tests

parent 502de5a5
...@@ -100,7 +100,7 @@ module Pod ...@@ -100,7 +100,7 @@ module Pod
end end
def write_config_to_file def write_config_to_file
File.write(CONFIG_FILE_PATH, config_hash.delete_blank.to_yaml) File.open(CONFIG_FILE_PATH, 'w') { |f| f.write(config_hash.delete_blank.to_yaml) }
end end
end end
......
...@@ -12,8 +12,7 @@ module Pod ...@@ -12,8 +12,7 @@ module Pod
project_name = 'SampleProject' project_name = 'SampleProject'
before do before do
Config.instance = nil Dir.stubs(:pwd).returns('~/code/OSS/SampleProject')
def Dir.pwd; '~/code/OSS/SampleProject'; end
@config_file_path = temporary_directory + "mock_config" @config_file_path = temporary_directory + "mock_config"
Command::Config.send(:remove_const, 'CONFIG_FILE_PATH') Command::Config.send(:remove_const, 'CONFIG_FILE_PATH')
...@@ -47,8 +46,7 @@ module Pod ...@@ -47,8 +46,7 @@ module Pod
lambda { run_command("config", "--local", 'ObjectiveSugar') }, lambda { run_command("config", "--local", 'ObjectiveSugar') },
lambda { run_command("config", "--global", 'ObjectiveSugar') }, lambda { run_command("config", "--global", 'ObjectiveSugar') },
lambda { run_command("config", '~/code/OSS/ObjectiveSugar') }, lambda { run_command("config", '~/code/OSS/ObjectiveSugar') },
] ].each { |invalid| invalid.should.raise CLAide::Help }
.each { |invalid| invalid.should.raise CLAide::Help }
end end
it "deletes local configuration by default" do it "deletes local configuration by default" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment