diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-07-08 23:26:28 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:06:14 +0900 |
commit | 4bc87cb1fb9ecbd227720bd48836935996574166 (patch) | |
tree | 407e9cdcbd6d453b1dd48b0ebce2a0d8a50997ef /spec | |
parent | 1e290c31f4fdfd330b9cd1d5c7fe61efa4ab066c (diff) |
[rubygems/rubygems] Remove `syck` traces from `bundler`
Same reason as in the previous commit.
https://github.com/rubygems/rubygems/commit/f00a6c8516
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/bundler_spec.rb | 24 | ||||
-rw-r--r-- | spec/bundler/bundler/endpoint_specification_spec.rb | 16 | ||||
-rw-r--r-- | spec/bundler/bundler/psyched_yaml_spec.rb | 9 |
3 files changed, 0 insertions, 49 deletions
diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler_spec.rb index b8191fe20f..aeadcf9720 100644 --- a/spec/bundler/bundler/bundler_spec.rb +++ b/spec/bundler/bundler/bundler_spec.rb @@ -21,30 +21,6 @@ RSpec.describe Bundler do it "catches YAML syntax errors" do expect { subject }.to raise_error(Bundler::GemspecError, /error while loading `test.gemspec`/) end - - context "on Rubies with a settable YAML engine", :if => defined?(YAML::ENGINE) do - context "with Syck as YAML::Engine" do - it "raises a GemspecError after YAML load throws ArgumentError" do - orig_yamler = YAML::ENGINE.yamler - YAML::ENGINE.yamler = "syck" - - expect { subject }.to raise_error(Bundler::GemspecError) - - YAML::ENGINE.yamler = orig_yamler - end - end - - context "with Psych as YAML::Engine" do - it "raises a GemspecError after YAML load throws Psych::SyntaxError" do - orig_yamler = YAML::ENGINE.yamler - YAML::ENGINE.yamler = "psych" - - expect { subject }.to raise_error(Bundler::GemspecError) - - YAML::ENGINE.yamler = orig_yamler - end - end - end end context "with correct YAML file", :if => defined?(Encoding) do diff --git a/spec/bundler/bundler/endpoint_specification_spec.rb b/spec/bundler/bundler/endpoint_specification_spec.rb index a9371f6617..2e2c16ec44 100644 --- a/spec/bundler/bundler/endpoint_specification_spec.rb +++ b/spec/bundler/bundler/endpoint_specification_spec.rb @@ -32,22 +32,6 @@ RSpec.describe Bundler::EndpointSpecification do ) end end - - context "when there is an ill formed requirement" do - before do - allow(Gem::Dependency).to receive(:new).with(name, [requirement1, requirement2]) { - raise ArgumentError.new("Ill-formed requirement [\"#<YAML::Syck::DefaultKey") - } - # Eliminate extra line break in rspec output due to `puts` in `#build_dependency` - allow(subject).to receive(:puts) {} - end - - it "should raise a Bundler::GemspecError with invalid gemspec message" do - expect { subject.send(:build_dependency, name, [requirement1, requirement2]) }.to raise_error( - Bundler::GemspecError, /Unfortunately, the gem foo \(1\.0\.0\) has an invalid gemspec/ - ) - end - end end describe "#parse_metadata" do diff --git a/spec/bundler/bundler/psyched_yaml_spec.rb b/spec/bundler/bundler/psyched_yaml_spec.rb deleted file mode 100644 index d5d68c5cc3..0000000000 --- a/spec/bundler/bundler/psyched_yaml_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require "bundler/psyched_yaml" - -RSpec.describe "Bundler::YamlLibrarySyntaxError" do - it "is raised on YAML parse errors" do - expect { YAML.parse "{foo" }.to raise_error(Bundler::YamlLibrarySyntaxError) - end -end |