You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to use run_simple results in a mis-leading error message:
"uninitialized constant Aruba::RSpec::Expectations"
Expected Behavior
When the run_simple method is incorrect, then there should be a meaningful error message
Current Behavior
running the following spec:
it('can do run_simple "false" without error') do
result = run_simple("false")
expect(result).to eql nil
end
results in the error message/backtrace below
1) basic plumbing working can do run_simple "false" without error
Failure/Error: result = run_simple("false")
NameError:
uninitialized constant Aruba::RSpec::Expectations
# /Users/yc98js1/.rvm/gems/ruby-2.0.0-p643/gems/aruba-0.14.1/lib/aruba/api/command.rb:283:in `rescue in run_simple'
# /Users/yc98js1/.rvm/gems/ruby-2.0.0-p643/gems/aruba-0.14.1/lib/aruba/api/command.rb:280:in `run_simple'
# ./spec/features/cuke_extract/cuke_extract_spec.rb:9:in `block (2 levels) in <top (required)>'
Possible Solution
Change line 283 of file /Users/yc98js1/dev/aruba/lib/aruba/api/command.rb to read as follows: rescue ::RSpec::Expectations::ExpectationNotMetError => e
NOTE the addition of leading "namespace separator" (I don't know the proper term for the :: operator) to anchor the expression
Steps to Reproduce (for bugs)
I forked the repo, added a test for this bug but was unable to get rspec to run the tests successfully -- they all failed with .rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:inrequire': cannot load such file -- fuubar (LoadError)`
If you can help me get the tests running, I'll be happy to submit an update.
Context
Trying to use run_simple for the first time and this error led me astray.
Your Environment
Version used: 0.14.0
Operating System and version: Mac OSX 10.11 (El Capitan)
Link to your project: Private project
The text was updated successfully, but these errors were encountered:
Summary
Attempting to use
run_simple
results in a mis-leading error message:"uninitialized constant Aruba::RSpec::Expectations"
Expected Behavior
When the
run_simple
method is incorrect, then there should be a meaningful error messageCurrent Behavior
running the following spec:
results in the error message/backtrace below
Possible Solution
Change line 283 of file /Users/yc98js1/dev/aruba/lib/aruba/api/command.rb to read as follows:
rescue ::RSpec::Expectations::ExpectationNotMetError => e
NOTE the addition of leading "namespace separator" (I don't know the proper term for the :: operator) to anchor the expression
Steps to Reproduce (for bugs)
I forked the repo, added a test for this bug but was unable to get rspec to run the tests successfully -- they all failed with
.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in
require': cannot load such file -- fuubar (LoadError)`If you can help me get the tests running, I'll be happy to submit an update.
Context
Trying to use run_simple for the first time and this error led me astray.
Your Environment
The text was updated successfully, but these errors were encountered: