require_relative "spec_helper" describe "ship ruby gem" do before(:all) do out = StringIO.new @test = Httpotemkin::Test.new(out: out) @test.add_server("rubygems") @test.add_server("api.rubygems") @test.add_server("obs") @test.up end after(:all) do @test.down end before(:each) do @client = @test.start_client @client.install_gem_from_spec("yes_ship_it.gemspec") remote_tar = File.expand_path("../data/red_herring-remote.tar.gz", __FILE__) @client.inject_tarball(remote_tar) end after(:each) do @test.stop_client end context "with existing credentials" do it "builds gem" do checkout_tar = File.expand_path("../data/red_herring-checkout-build.tar.gz", __FILE__) @client.inject_tarball(checkout_tar) @client.execute(["yes_ship_it.ruby2.5"], working_directory: "red_herring") expect(@client.exit_code).to eq(0) expected_output = <