-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Make the Summary report able to say if the total result is ok. #140
Conversation
lib/cucumber/core/test/result.rb
Outdated
TYPES = [:passed, :failed, :undefined, :unknown, :skipped, :pending].freeze | ||
|
||
def self.ok?(type, be_strict = false) | ||
private |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this private
meant to sit inside the method body?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I put that method last in the module after a private
modifier:
private
def self.ok?(type, be_strict = false)
...
Then rubocop issued the warning:
private (on line xxx) does not make singleton methods private.
Use private_class_method or private inside a class << self block instead.
Then I changed it like it is now (and rubocop does not comment on it), so my conclusion is that it makes the self.ok?
private to the module.
* Add TYPES constant to Result module * Make ok? class methods on the Result classes * Make the Summary result able to way if the total result is ok.
b201c9e
to
022e8dd
Compare
## [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)
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. |
Summary
Make the Summary report able to say if the total result is ok.
Details
Motivation and Context
The intention is to remove duplication and simplify the exit code logic in Cucumber-Ruby.
The logic of whether a certain result is ok or not is implemented in each
Result
class - and is used in several formatters. This logic should be used in more places, for instance in the exit code logic in Cucumber-Ruby.How Has This Been Tested?
The automated test suite has been updated to verify this behaviour.
Types of changes
Checklist: