piotrmurach / tty-prompt

A beautiful and powerful interactive command line prompt
https://ttytoolkit.org
MIT License
1.47k stars 136 forks source link

Add spec to detect Forwardable error on Ruby 2.4 #43

Closed muellerj closed 7 years ago

muellerj commented 7 years ago

Attached a PR that seems to catch the error message in Ruby 2.4 Forwardable:

projects/tty-prompt [2m|master:1↑] (1) chruby 2.3 && bundle exec rspec --no-profile spec/unit/select_spec.rb:25
Run options: include {:locations=>{"./spec/unit/select_spec.rb"=>[25]}}

Randomized with seed 28836

TTY::Prompt#select
  allows navigation using events without errors

Finished in 0.05101 seconds (files took 0.85909 seconds to load)
1 example, 0 failures

Randomized with seed 28836

projects/tty-prompt [4m|master:1↑] (1) chruby 2.4 && bundle exec rspec --no-profile spec/unit/select_spec.rb:25
Run options: include {:locations=>{"./spec/unit/select_spec.rb"=>[25]}}

Randomized with seed 64125

TTY::Prompt#select
  allows navigation using events without errors (FAILED - 1)

Failures:

  1) TTY::Prompt#select allows navigation using events without errors
     Failure/Error: expect{ prompt.select('What size?', choices) }.not_to output.to_stderr
       expected block to not output to stderr, but output "/cygdrive/c/Users/q284114/projects/tty-prompt/spec/unit/select_spec.rb:30:in `block (3 levels) in <t...-2.4.0/lib/ruby/2.4.0/forwardable.rb:156 forwarding to private method TTY::Prompt::Reader#publish\n"
     # ./spec/unit/select_spec.rb:32:in `block (2 levels) in <top (required)>'

Finished in 0.06701 seconds (files took 0.48705 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/select_spec.rb:25 # TTY::Prompt#select allows navigation using events without errors

Randomized with seed 64125

See issue #35.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling bef0effd912ad37fc08916cbad101e1e9b6a2ab0 on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling bef0effd912ad37fc08916cbad101e1e9b6a2ab0 on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling bef0effd912ad37fc08916cbad101e1e9b6a2ab0 on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling bef0effd912ad37fc08916cbad101e1e9b6a2ab0 on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling bef0effd912ad37fc08916cbad101e1e9b6a2ab0 on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling b41faa40cdb061ba2fd6db4cc6ac3100762e754a on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.975% when pulling b41faa40cdb061ba2fd6db4cc6ac3100762e754a on muellerj:master into 4f072359510ef28bdf3360d3c6af4d0ae425c1fe on piotrmurach:master.

piotrmurach commented 7 years ago

Nice!