Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test suite for Ruby 2.4 compatibility. #120

Merged
merged 3 commits into from
Feb 3, 2017

Conversation

junaruga
Copy link
Contributor

@junaruga junaruga commented Jan 9, 2017

Summary

Fix test suite for Ruby 2.4 compatibility.

Details

bundle exec rake spec:warnings is failed on Ruby 2.4
bundle exec rake spec:slow is succeed on Ruby 2.4

Motivation and Context

Maybe we want to support cucumber on Ruby 2.4.

How Has This Been Tested?

On latest master branch.
On Fedora 24

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux

$ bundle -v
Bundler version 1.13.7
$ bundle install --path vendor/bundle

Ignore the warnings under vendor as it is not checked on Travis CI.

$ bundle exec rake spec:warnings
...
/home/jaruga/git/cucumber-ruby-core/spec/coverage.rb:10:in `<top (required)>': [DEPRECATION] ::[] is deprecated. Use ::new instead.
...
/home/jaruga/git/cucumber-ruby-core/vendor/bundle/ruby/2.4.0/gems/simplecov-0.12.0/lib/simplecov/configuration.rb:207: warning: constant ::Fixnum is deprecated
/home/jaruga/git/cucumber-ruby-core/vendor/bundle/ruby/2.4.0/gems/simplecov-0.12.0/lib/simplecov/source_file.rb:29: warning: constant ::Fixnum is deprecated
/home/jaruga/git/cucumber-ruby-core/vendor/bundle/ruby/2.4.0/gems/simplecov-0.12.0/lib/simplecov/source_file.rb:30: warning: constant ::Fixnum is deprecated
...
rake aborted!
Please remove all cucumber-core warnings.
$ bundle exec rake spec:slow
...
1 example, 0 failures

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Is it possible to add ruby 2.4.0 to .travis.yml?

@mattwynne
Copy link
Member

@junaruga yes, please do add ruby 2.4 to the .travis.yml config as part of this PR.

@junaruga
Copy link
Contributor Author

junaruga commented Feb 1, 2017

@mattwynne sorry, I saw your message now. Just moment. I will add it.

@junaruga
Copy link
Contributor Author

junaruga commented Feb 1, 2017

Travis failed for onlly Ruby 2.4.0 test because of core dump.

https://travis-ci.org/cucumber/cucumber-ruby-core/builds/197417467
https://travis-ci.org/cucumber/cucumber-ruby-core/jobs/197417468

$ bundle exec rake

/home/travis/.rvm/rubies/ruby-2.4.0/bin/ruby -r./spec/coverage -w -I/home/travis/.rvm/gems/ruby-2.4.0/gems/rspec-core-3.5.4/lib:/home/travis/.rvm/gems/ruby-2.4.0/gems/rspec-support-3.5.0/lib /home/travis/.rvm/gems/ruby-2.4.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

Run options: exclude {:slow=>true}
...
348 examples, 0 failures
...
/home/travis/.rvm/gems/ruby-2.4.0/gems/simplecov-0.12.0/lib/simplecov/source_file.rb:84: [BUG] Segmentation fault at 0xfffffffffffffff9
...
Aborted (core dumped)

/home/travis/.rvm/rubies/ruby-2.4.0/bin/ruby -r./spec/coverage -w -I/home/travis/.rvm/gems/ruby-2.4.0/gems/rspec-core-3.5.4/lib:/home/travis/.rvm/gems/ruby-2.4.0/gems/rspec-support-3.5.0/lib /home/travis/.rvm/gems/ruby-2.4.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

2 non-cucumber-core warnings detected, set VIEW_OTHER_WARNINGS=true to see them.

…vironment

to latest version to prevent core dump.
@junaruga
Copy link
Contributor Author

junaruga commented Feb 1, 2017

Now all the tests are passed after updating simplecv from 0.12.0 to latest version 0.13.0.
But this solution might be not good.
Because cucumber-cury-core depends on coveralls (0.8.19).
coveralls (0.8.19) depends on simplecov (~> 0.12.0).

from my local Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
...
    coveralls (0.8.19)
...
      simplecov (~> 0.12.0)

As a another solution, we might be able to wait coveralls next release with simplecov 0.13.0
lemurheavy/coveralls-ruby#117

@mattwynne mattwynne merged commit 6a7c51c into cucumber:master Feb 3, 2017
mattwynne added a commit that referenced this pull request Feb 3, 2017
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 21, 2018
## [3.0.0](cucumber/cucumber-ruby-core@v3.0.0.pre.2...v3.0.0) (2017-09-27)

### Changed

* Step#name renamed to #text ([#137](cucumber/cucumber-ruby-core#137) [@olleolleolle](https://github.com/olleolleolle))
* Use past tense in event names (`xStarting` -> `xStarted`) (see [cucumber/cucumber-ruby#1166](cucumber/cucumber-ruby#1166) @brasmusson).

### Added

* Do not create test cases for scenarios with no steps ([#144](cucumber/cucumber-ruby-core#144) @brasmusson)
* Handle selective strict settings ([#143](cucumber/cucumber-ruby-core#143) @brasmusson)

### Fixed

* Fix DataTable's Location to be aware of all of its lines ([#142](cucumber/cucumber-ruby-core#142) @botandrose)

### Improved

* As per [#251](cucumber/common#251): renamed History.md to CHANGELOG.md, added contributing message at beginning, and misc formatting. ([#145](cucumber/cucumber-ruby-core#145) [jaysonesmith](https://github.com/jaysonesmith))

## [3.0.0.pre.2](cucumber/cucumber-ruby-core@v2.0.0...3.0.0.pre.2) (2017-07-26)

### New Features

* Add a flaky result type to be used for flaky scenarios ([#141](cucumber/cucumber-ruby-core#141), [cucumber/cucumber-ruby#1044](cucumber/cucumber-ruby#1044) @brasmusson)
* Make the Summary report able to say if the total result is ok ([#140](cucumber/cucumber-ruby-core#140) @brasmusson)
* Replay previous events to new subscribers ([#136](cucumber/cucumber-ruby-core#136) @mattwynne)
* Ruby 2.4.0 compatibility ([#120](cucumber/cucumber-ruby-core#120) @junaruga)
* Use tag expressions ([#116](cucumber/cucumber-ruby-core#116) @brasmusson)
* Access example table row data by param name ([#118](cucumber/cucumber-ruby-core#118) @enkessler)

### Bugfixes

N/A

### Removed Features

N/A

### Refactoring

* Travis: jruby-9.1.10.0 ([#130](cucumber/cucumber-ruby-core#130) @olleolleolle)
* Travis: jruby-9.1.12.0 ([#133](cucumber/cucumber-ruby-core#132) @olleolleolle)
@lock
Copy link

lock bot commented Oct 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants