dry-rb / dry-container

A simple, configurable object container implemented in Ruby
https://dry-rb.org/gems/dry-container
MIT License
335 stars 41 forks source link

Test failures #69

Closed utkarsh2102 closed 4 years ago

utkarsh2102 commented 4 years ago

Hi, There are test failures when tried to build on a Debian system. Here are the logs:

┌──────────────────────────────────────────────────────────────────────────────┐
│ Run tests for ruby2.5 from debian/ruby-tests.rake                            │
└──────────────────────────────────────────────────────────────────────────────┘

RUBYLIB=. GEM_PATH=debian/ruby-dry-container/usr/share/rubygems-integration/all:/home/utkarsh/.gem/ruby/2.5.0:/var/lib/gems/2.5.0:/usr/lib/ruby/gems/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0 ruby2.5 -S rake -f debian/ruby-tests.rake
/usr/bin/ruby2.5 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation

An error occurred while loading ./spec/spec_helper.rb.
Failure/Error:
  Dir[Pathname(__FILE__).dirname.join('support/**/*.rb').to_s].each do |file|
    require file
  end

NoMethodError:
  undefined method `Pathname' for main:Object
# ./spec/spec_helper.rb:102:in `<top (required)>'

An error occurred while loading ./spec/integration/container_spec.rb.
Failure/Error: it_behaves_like 'a container'

ArgumentError:
  Could not find shared examples "a container"
# ./spec/integration/container_spec.rb:5:in `block in <top (required)>'
# ./spec/integration/container_spec.rb:1:in `<top (required)>'

An error occurred while loading ./spec/integration/container_spec.rb.
Failure/Error: it_behaves_like 'a container'

ArgumentError:
  Could not find shared examples "a container"
# ./spec/integration/container_spec.rb:5:in `block in <top (required)>'
# ./spec/integration/container_spec.rb:1:in `<top (required)>'

An error occurred while loading ./spec/integration/mixin_spec.rb.
Failure/Error: it_behaves_like 'a container'

ArgumentError:
  Could not find shared examples "a container"
# ./spec/integration/mixin_spec.rb:8:in `block (2 levels) in <top (required)>'
# ./spec/integration/mixin_spec.rb:2:in `block in <top (required)>'
# ./spec/integration/mixin_spec.rb:1:in `<top (required)>'

An error occurred while loading ./spec/integration/mixin_spec.rb.
Failure/Error: it_behaves_like 'a container'

ArgumentError:
  Could not find shared examples "a container"
# ./spec/integration/mixin_spec.rb:8:in `block (2 levels) in <top (required)>'
# ./spec/integration/mixin_spec.rb:2:in `block in <top (required)>'
# ./spec/integration/mixin_spec.rb:1:in `<top (required)>'
No examples found.
No examples found.

Randomized with seed 63721

Randomized with seed 63721

Top 0 slowest examples (0 seconds, 0.0% of total time):

Finished in 0.00025 seconds (files took 0.17628 seconds to load)
0 examples, 0 failures, 3 errors occurred outside of examples

Finished in 0.00025 seconds (files took 0.17628 seconds to load)
0 examples, 0 failures, 3 errors occurred outside of examples

Randomized with seed 63721

Randomized with seed 63721

/usr/bin/ruby2.5 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
ERROR: Test "ruby2.5" failed. Exiting.
utkarsh2102 commented 4 years ago

Ah, here's the patch if you're interested:

--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,4 +1,4 @@
-# require 'pathname'
+require 'pathname'

 if RUBY_ENGINE == 'ruby' && ENV['COVERAGE'] == 'true'
   require 'yaml'