diff --git a/Gemfile b/Gemfile index e860ee61cb9..2d2ce8185aa 100644 --- a/Gemfile +++ b/Gemfile @@ -388,7 +388,6 @@ group :test do gem 'json-schema', '~> 2.8.0' gem 'webmock', '~> 3.5.1' gem 'rails-controller-testing' - gem 'sham_rack', '~> 1.3.6' gem 'concurrent-ruby', '~> 1.1' gem 'test-prof', '~> 0.2.5' gem 'rspec_junit_formatter' diff --git a/Gemfile.lock b/Gemfile.lock index 3614f111a4b..f7776b296da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -884,8 +884,6 @@ GEM faraday (>= 0.7.6, < 1.0) settingslogic (2.0.9) sexp_processor (4.12.0) - sham_rack (1.3.6) - rack shoulda-matchers (4.0.1) activesupport (>= 4.2.0) sidekiq (5.2.7) @@ -1232,7 +1230,6 @@ DEPENDENCIES selenium-webdriver (~> 3.141) sentry-raven (~> 2.9) settingslogic (~> 2.0.9) - sham_rack (~> 1.3.6) shoulda-matchers (~> 4.0.1) sidekiq (~> 5.2.7) sidekiq-cron (~> 1.0) diff --git a/spec/lib/container_registry/blob_spec.rb b/spec/lib/container_registry/blob_spec.rb index ba7f76cfa3b..ec5addc7c68 100644 --- a/spec/lib/container_registry/blob_spec.rb +++ b/spec/lib/container_registry/blob_spec.rb @@ -116,7 +116,7 @@ describe ContainerRegistry::Blob do let(:location) { 'file:///etc/passwd' } it 'raises an error' do - expect { blob.data }.to raise_error(ArgumentError, 'invalid address') + expect { blob.data }.to raise_error(NoMethodError, %q{undefined method `request_uri' for #}) end end end diff --git a/spec/services/projects/download_service_spec.rb b/spec/services/projects/download_service_spec.rb index f25233ceeb1..06efc2ff825 100644 --- a/spec/services/projects/download_service_spec.rb +++ b/spec/services/projects/download_service_spec.rb @@ -20,13 +20,8 @@ describe Projects::DownloadService do context 'for URLs that are on the whitelist' do before do - sham_rack_app = ShamRack.at('mycompany.fogbugz.com').stub - sham_rack_app.register_resource('/rails_sample.jpg', File.read(Rails.root + 'spec/fixtures/rails_sample.jpg'), 'image/jpg') - sham_rack_app.register_resource('/doc_sample.txt', File.read(Rails.root + 'spec/fixtures/doc_sample.txt'), 'text/plain') - end - - after do - ShamRack.unmount_all + stub_request(:get, 'http://mycompany.fogbugz.com/rails_sample.jpg').to_return(body: File.read(Rails.root + 'spec/fixtures/rails_sample.jpg')) + stub_request(:get, 'http://mycompany.fogbugz.com/doc_sample.txt').to_return(body: File.read(Rails.root + 'spec/fixtures/doc_sample.txt')) end context 'an image file' do