Skip to content

Failure/Error: source: Pathname(filename).read #111

Description

Platform: Windows
Ruby: 2.7.2

Trying to run dead_end on my spec files. I added --require dead_end to my .rspec file. I manually delete an end in my code and run which produces this backtrace:

C:\_Programs\COSMOS\COSMOS\cosmos>rspec spec\microservices\microservice_spec.rb

An error occurred while loading ./spec/microservices/microservice_spec.rb.
Failure/Error: source: Pathname(filename).read,

Errno::ENOENT:
  No such file or directory @ rb_sysopen - C
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end.rb:24:in `read'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end.rb:24:in `read'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end.rb:24:in `handle_error'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end/auto.rb:17:in `rescue in load'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end/auto.rb:14:in `load'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2112:in `load_file_handling_errors'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1615:in `block in load_spec_files'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1613:in `each'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1613:in `load_spec_files'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:102:in `setup'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:86:in `run'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/exe/rspec:4:in `<top (required)>'
# C:/Ruby27-x64/bin/rspec:23:in `load'
# C:/Ruby27-x64/bin/rspec:23:in `<main>'
#
#   Showing full backtrace because every line was filtered out.
#   See docs for RSpec::Configuration#backtrace_exclusion_patterns and
#   RSpec::Configuration#backtrace_inclusion_patterns for more information.
# ------------------
# --- Caused by: ---
# SyntaxError:
#   C:/_Programs/COSMOS/COSMOS/cosmos/spec/microservices/microservice_spec.rb:54: syntax error, unexpected end-of-input, expecting `end'
#   C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end/auto.rb:15:in `load'
No examples found.


Finished in 0.00004 seconds (files took 0.68202 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions