README.md in cucumber_priority-0.2.0 vs README.md in cucumber_priority-0.3.0
- old
+ new
@@ -14,64 +14,72 @@
### Marking step definitions as overridable
To mark a step definition as overridable, call `#overridable` on the definition object:
- Given /^there is a movie with a (.*?) tone$/ do
- ...
- end.overridable
+```ruby
+Given /^there is a movie with a (.*?) tone$/ do
+ ...
+end.overridable
- Given there is a movie with a funny tone do
- ...
- end
+Given /^there is a movie with a funny tone$/ do
+ ...
+end
+```
The following step will now **no longer raise `Cucumber::Ambiguous`**:
- Given there is a movie with a funny tone
+```cucumber
+Given there is a movie with a funny tone
+```
If a step matches more than one non-overridable steps, Cucumber will still raise `Cucumber::Ambiguous`.
### Defining priorities
You can define priorities for overridable steps by passing an numeric `:priority` option to `#overridable:`
- Given /^there is a movie with a (.*?) tone$/ do
- ...
- end.overridable(priority: 1)
+```ruby
+Given /^there is a movie with a (.*?) tone$/ do
+ ...
+end.overridable(priority: 1)
- Given /^there is a movie with a (sad|upbeat|disturbing) tone$/ do
- ...
- end.overridable(priority: 5)
+Given /^there is a movie with a (sad|upbeat|disturbing) tone$/ do
+ ...
+end.overridable(priority: 5)
+```
A higher priority wins the match.
A non-overridable step will always win over an overridable step regardless of its priority.
Supported Cucumber versions
----------------------------
-cucumber_priority is tested against Cucumber 1.3, 2.4 and 3.0.
+cucumber_priority is tested against Cucumber 1.3, 2.4, 3.0 and 3.1.
Installation
------------
In your `Gemfile` say:
- gem 'cucumber_priority'
+```ruby
+gem 'cucumber_priority'
+```
Now run `bundle install` and restart your server.
Development
-----------
There are tests in `spec`. We only accept PRs with tests. To run tests:
-- Install Ruby 2.3.3
+- Install Ruby 2.5.0
- Install development dependencies using `bundle install`
- Run tests using `bundle exec rspec`
We recommend to test large changes against multiple versions of Ruby and multiple dependency sets. Supported combinations are configured in `.travis.yml`. We provide some rake tasks to help with this:
@@ -90,6 +98,7 @@
Credits
-------
-Henning Koch from [makandra](http://www.makandra.com/)
+Henning Koch from [makandra](https://makandra.com/)
+