From ae207dbeb56da1dd136c124ca6b8de3752aaad4f Mon Sep 17 00:00:00 2001 From: Tom Lea Date: Sun, 20 Jan 2013 16:10:00 +0000 Subject: [PATCH] Don't assume the test box has a gemcutter account --- .gitignore | 1 + test/fixtures/fake_home_path/.gem/credentials | 2 ++ test/test_support/geminabox_test_case.rb | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/fake_home_path/.gem/credentials diff --git a/.gitignore b/.gitignore index 566afdd0..c1b3f973 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ tmp/restart.txtGemfile.lock Gemfile.lock vendor/bundle .rbenv-version +test/fixtures/fake_home_path/.gem/specs diff --git a/test/fixtures/fake_home_path/.gem/credentials b/test/fixtures/fake_home_path/.gem/credentials new file mode 100644 index 00000000..1dfc67bc --- /dev/null +++ b/test/fixtures/fake_home_path/.gem/credentials @@ -0,0 +1,2 @@ +--- +:rubygems_api_key: "fake key" diff --git a/test/test_support/geminabox_test_case.rb b/test/test_support/geminabox_test_case.rb index dc2cc2fb..1a04e33a 100644 --- a/test/test_support/geminabox_test_case.rb +++ b/test/test_support/geminabox_test_case.rb @@ -119,7 +119,8 @@ def execute(command) def gemcutter_push(gemfile) Geminabox::TestCase.setup_fake_home! - command = "GEM_HOME=#{FAKE_HOME} gem push #{gemfile} --host '#{config.url_with_port(@test_server_port)}' 2>&1" + home= FIXTURES_PATH.join('fake_home_path') + command = "GEM_HOME=#{FAKE_HOME} HOME=#{home} gem push #{gemfile} --host '#{config.url_with_port(@test_server_port)}' 2>&1" puts "About to run #{command.inspect}" execute(command) end