diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb index 40739a431b8..8252367f992 100644 --- a/spec/bundler/dsl_spec.rb +++ b/spec/bundler/dsl_spec.rb @@ -192,6 +192,7 @@ let(:platform) { "ruby" } it "keeps track of the ruby platforms in the dependency" do + allow(Gem::Platform).to receive(:local).and_return(rb) subject.gemspec expect(subject.dependencies.last.platforms).to eq(Bundler::Dependency::REVERSE_PLATFORM_MAP[Gem::Platform::RUBY]) end