Skip to content

Commit

Permalink
chore: set env var using IO.popen argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Sep 3, 2017
1 parent 92a7308 commit 7677987
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ script:
- bundle install
- bundle exec rake spec
- bundle exec rake package
- script/kill-leftover-processes-on-travis.sh
deploy:
- provider: releases
api_key:
Expand Down
14 changes: 0 additions & 14 deletions script/kill-leftover-processes-on-travis.sh

This file was deleted.

1 change: 0 additions & 1 deletion spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@


after(:all) do
puts "bethtest killing #{@pipe.pid}"
Process.kill 'KILL', @pipe.pid
end
end
5 changes: 1 addition & 4 deletions spec/integration_with_custom_header_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
describe "pact-provider-verifier with basic auth" do
before(:all) do
ENV['USE_BASIC_AUTH'] = 'true'
@pipe = IO.popen("bundle exec rackup -p 4570 spec/support/config.ru")
ENV.delete('USE_BASIC_AUTH')
@pipe = IO.popen({'USE_BASIC_AUTH' => 'true'}, %w{bundle exec rackup -p 4570 spec/support/config.ru})
sleep 2
end

Expand All @@ -21,7 +19,6 @@
end

after(:all) do
puts "bethtest killing #{@pipe.pid}"
Process.kill 'KILL', @pipe.pid
end
end
1 change: 1 addition & 0 deletions spec/support/config.ru
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require_relative 'provider'

if ENV['USE_BASIC_AUTH'] == 'true'
puts "Starting server with basic auth"
use Rack::Auth::Basic, "Restricted Area" do |username, password|
username == 'pact' and password == 'pact'
end
Expand Down

0 comments on commit 7677987

Please sign in to comment.