I'm trying to test a ruby command line script but am having troubles running tests with Cucumber-less Aruba in RSpec 3.
Some weird errors, some obvious ones.
e.g. weird:
1) test does something
Failure/Error: run_simple("cli_test.rb -h", true)
ArgumentError:
wrong number of arguments (2 for 1)
# .../.gem/ruby/2.2.0/gems/aruba-0.6.2/lib/aruba/api.rb:632:in `assert_exit_status'
# .../.gem/ruby/2.2.0/gems/aruba-0.6.2/lib/aruba/api.rb:750:in `run_simple'
# ./spec/cli_test_spec.rb:17:in `block (2 levels) in <top (required)>'
Looking in the code, I can't even see what's triggering this. Trying to use Pry or Pry-byebug to check out the erroneous 2 args isn't working on it either (a whole bunch of other errors).
Then, e.g. obvious:
1) test does something
Failure/Error: check_file_presence(["bin/cli_test.rb"], true)
only the `receive` or `receive_messages` matchers are supported with
`expect(...).to`, but you have provided:
#<RSpec::Matchers::BuiltIn::BePredicate:0x007fb36c88d6b0>
# ... error lines ...
& here, the errors are obviously correct, Aruba is using Rspec 2 syntax.
So I added
config.expect_with :rspec do |c|
c.syntax = [:should, :expect]
end
to my rspec config, but still not working.
Any ideas? Tips? Examples of this working anywhere?
Thanks in advance.