Skip to content

Error caught while randomly testing: undefined local variable or method `option_name' for Escort::Setup::Dsl::Options #15

@thegreyfellow

Description

@thegreyfellow

Caught this issue while fixing failing tests, and thought to put it here maybe someone with more knowledge of the code base could have a look at it.

Environment:
Ruby-2.4.2
RSpec-3.7.0
All gems updated to latest version as of date of issue submission.

$ rspec spec --seed 46460
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 46460

Escort basic app with dependent options
  when dependency specification has no 'on' parameter
Problem with syntax of global configuration
Problem with syntax of global configuration (Escort::ClientError)
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/global.rb:9:in `rescue in initialize'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/global.rb:6:in `initialize'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/options.rb:9:in `rescue in options': Problem with syntax of global options block (Escort::ClientError)
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/options.rb:65:in `ensure_dependency_specification_syntax': undefined local variable or method `option_name' for #<Escort::Setup::Dsl::Options:0x00007f88761ccba8>
Did you mean?  @options (NameError)
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/options.rb:34:in `dependency'
/Users/idmoussiyoussef/Projects/ruby/escort/spec/integration/basic_depends_on_spec.rb:11:in `block (5 levels) in <top (required)>'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/options.rb:7:in `options'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/command.rb:16:in `options'
/Users/idmoussiyoussef/Projects/ruby/escort/spec/integration/basic_depends_on_spec.rb:7:in `block (4 levels) in <top (required)>'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/setup/dsl/global.rb:7:in `initialize'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/app.rb:23:in `new'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/app.rb:23:in `setup_application'
/Users/idmoussiyoussef/Projects/ruby/escort/lib/escort/app.rb:6:in `create'
/Users/idmoussiyoussef/Projects/ruby/escort/spec/integration/basic_depends_on_spec.rb:2:in `block (2 levels) in <top (required)>'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:157:in `fetch'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:157:in `block (2 levels) in fetch_or_store'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-support-3.7.0/lib/rspec/support/reentrant_mutex.rb:23:in `synchronize'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:156:in `block in fetch_or_store'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:155:in `fetch'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:155:in `fetch_or_store'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb:298:in `block in let'
/Users/idmoussiyoussef/Projects/ruby/escort/spec/integration/basic_depends_on_spec.rb:20:in `block (3 levels) in <top (required)>'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:254:in `instance_exec'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:254:in `block in run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `block in run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:604:in `run_around_example_hooks_for'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:251:in `run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:628:in `block in run_examples'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `map'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `run_examples'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:590:in `run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `block in run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `map'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `map'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1896:in `with_suite_hooks'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:113:in `block in run_specs'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/reporter.rb:79:in `report'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:112:in `run_specs'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:87:in `run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:71:in `run'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:45:in `invoke'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/gems/rspec-core-3.7.0/exe/rspec:4:in `<top (required)>'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/bin/rspec:23:in `load'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/bin/rspec:23:in `<main>'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
/Users/idmoussiyoussef/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'
Escort app failed to execute successfully, due to client setup error

Finished in 0.08564 seconds (files took 0.23726 seconds to load)
1 example, 0 failures

Randomized with seed 46460 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions