https://github.com/andrew/cucumber-ruby
Cucumber for Ruby. It's amazing!
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 468 committers (0.4%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.0%) to scientific vocabulary
Keywords from Contributors
authorization
oauth2
oauth2-client
oidc
oidc-client
bioinformatics
transformation
distributed
argument-parser
deep-neural-networks
Last synced: 10 months ago
·
JSON representation
Repository
Cucumber for Ruby. It's amazing!
Basic Info
- Host: GitHub
- Owner: andrew
- License: mit
- Default Branch: main
- Homepage: https://cucumber.io
- Size: 16 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of cucumber/cucumber-ruby
Created over 1 year ago
· Last pushed over 1 year ago
https://github.com/andrew/cucumber-ruby/blob/main/
# Cucumber [](https://vshymanskyy.github.io/StandWithUkraine) [](https://opencollective.com/cucumber) [](https://opencollective.com/cucumber) [](https://github.com/cucumber/cucumber-ruby/actions/workflows/test.yaml) [](https://codeclimate.com/github/cucumber/cucumber-ruby) [](https://coveralls.io/r/cucumber/cucumber-ruby?branch=main) Cucumber is a tool for running automated tests written in plain language. Because they're written in plain language, they can be read by anyone on your team. Because they can be read by anyone, you can use them to help improve communication, collaboration and trust on your team.
This is the Ruby implementation of Cucumber. Cucumber is also available for [JavaScript](https://github.com/cucumber/cucumber-js), [Java](https://github.com/cucumber/cucumber-jvm), and a lot of other languages. You can find a list of implementations here: https://cucumber.io/docs/installation/. See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber (issues, PRs, etc.). Everyone interacting in this codebase and issue tracker is expected to follow the Cucumber [code of conduct](https://cucumber.io/conduct). ## Installation Cucumber for Ruby is a Ruby gem. Install it as you would install any gem: add `cucumber` to your Gemfile: gem 'cucumber' then install it: $ bundle or install the gem directly: $ gem install cucumber Later in this document, bundler is considered being used so all commands are using `bundle exec`. If this is not the case for you, execute `cucumber` directly, without `bundle exec`. ### Supported platforms - Ruby 3.2 - Ruby 3.1 - Ruby 3.0 - Ruby 2.7 - TruffleRuby 22.0.0+ - JRuby 9.4+ (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/main/docs/jruby-limitations.md)) ### Ruby on Rails Using Ruby on Rails? You can use [cucumber-rails](https://github.com/cucumber/cucumber-rails) to bring Cucumber into your Rails project. ## Usage ### Initialization If you need to, initialize your `features` directory with $ bundle exec cucumber --init This will create the following directories and files if they do not exist already: features step_definitions support env.rb ### Create your specification Create a file named `rule.feature` in the `features` directory with: ```gherkin # features/rule.feature Feature: Rule Sample Rule: This is a rule Example: A passing example Given this will pass When I do an action Then some results should be there Example: A failing example Given this will fail When I do an action Then some results should be there ``` ### Automate your specification And a file named `steps.rb` in `features/step_definitions` with: ```ruby # features/step_definitions/steps.rb Given('this will pass') do @this_will_pass = true end Given('this will fail') do @this_will_pass = false end When('I do an action') do :no_op end Then("some results should be there") do expect(@this_will_pass).to be true end ``` ### Run Cucumber $ bundle exec cucumber To execute a single feature file: $ bundle exec cucumber features/rule.feature To execute a single example, indicates the line of the name of the example: $ bundle exec cucumber features/rule.feature:5 To summarize the results on the standard output, and generate a HTML report on disk: $ bundle exec cucumber --format summary --format html --out report.html For more command line options $ bundle exec cucumber --help You can also find documentation on the command line possibilities in [features/docs/cli](features/docs/cli). ## Documentation and support - Getting started, writing features, step definitions, and more: https://cucumber.io/docs - Ruby API Documentation: http://www.rubydoc.info/github/cucumber/cucumber-ruby/ - Community support forum: https://github.com/orgs/cucumber/discussions - Discord: [register for an account](https://cucumber.io/docs/community/get-in-touch#discord) ## Copyright Copyright (c) Cucumber Ltd. and Contributors. See LICENSE for details.
Owner
- Name: Andrew Nesbitt
- Login: andrew
- Kind: user
- Location: Bristol, UK
- Company: @ecosyste-ms and @octobox
- Website: https://nesbitt.io
- Twitter: teabass
- Repositories: 357
- Profile: https://github.com/andrew
Working on mapping the world of open source software @ecosyste-ms and empowering developers with @octobox
GitHub Events
Total
- Delete event: 1
- Push event: 1
Last Year
- Delete event: 1
- Push event: 1
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Aslak Hellesøy | a****y@g****m | 2,452 |
| Matt Wynne | m****t@m****t | 932 |
| Vincent Pretre | v****e@g****m | 329 |
| Joseph Wilk | j****k@j****k | 216 |
| Björn Rasmusson | B****n@c****g | 195 |
| Jayson Smith | g****b@n****m | 193 |
| Oleg Sukhodolsky | o****3@g****m | 136 |
| Ben Mabey | b****n@b****m | 132 |
| Joseph Wilk | j****e@j****t | 123 |
| Steve Tooke | s****e@h****s | 122 |
| Steve Tooke | s****e@b****k | 82 |
| Aurélien Reeves | a****s@s****m | 75 |
| Jim van Musscher | j****r@g****m | 73 |
| David Chelimsky | d****y@g****m | 59 |
| Chris Parsons | c****s@t****m | 47 |
| Andrea Nodari | a****1@g****m | 35 |
| Luke Hill | 2****l@u****m | 35 |
| Christophe Bliard | c****d@t****o | 34 |
| Luke Hill | l****k@h****m | 34 |
| Peter Jaros | p****a@d****m | 34 |
| Bryan Helmkamp | b****n@b****m | 33 |
| ghnatiuk | g****k@g****m | 31 |
| Matt Wynne | m****t@c****o | 29 |
| Daniel Cadenas | d****s@g****m | 28 |
| Dana Scheider | d****r@g****m | 26 |
| Aslak Hellesøy | a****y@s****m | 25 |
| renovate[bot] | 2****]@u****m | 25 |
| John Voloski | j****i@c****r | 23 |
| Micah Geisel | m****h@b****m | 22 |
| Jari Bakken | j****n@g****m | 21 |
| and 438 more... | ||
Committer Domains (Top 20 + Academic)
redhat.com: 4
weplay.com: 3
me.com: 3
smartbear.com: 3
engineyard.com: 3
thoughtworks.com: 2
claysnow.co.uk: 2
icontact.com: 2
yandex.ru: 2
cucumber.io: 2
jetbrains.com: 2
iki.fi: 2
thoughtbot.com: 2
mdsol.com: 2
yugui.jp: 1
echowaves.com: 1
patientkeeper.com: 1
lanpartei.de: 1
sarvar-laptop.(none): 1
jteigen.com: 1
fedux.org: 1
burnet.edu.au: 1
# Cucumber
[](https://vshymanskyy.github.io/StandWithUkraine)
[](https://opencollective.com/cucumber)
[](https://opencollective.com/cucumber)
[](https://github.com/cucumber/cucumber-ruby/actions/workflows/test.yaml)
[](https://codeclimate.com/github/cucumber/cucumber-ruby)
[](https://coveralls.io/r/cucumber/cucumber-ruby?branch=main)
Cucumber is a tool for running automated tests written in plain language. Because they're
written in plain language, they can be read by anyone on your team. Because they can be
read by anyone, you can use them to help improve communication, collaboration and trust on
your team.
This is the Ruby implementation of Cucumber. Cucumber is also available for [JavaScript](https://github.com/cucumber/cucumber-js),
[Java](https://github.com/cucumber/cucumber-jvm), and a lot of other languages. You can find a list of implementations here: https://cucumber.io/docs/installation/.
See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber (issues, PRs, etc.).
Everyone interacting in this codebase and issue tracker is expected to follow the
Cucumber [code of conduct](https://cucumber.io/conduct).
## Installation
Cucumber for Ruby is a Ruby gem. Install it as you would install any gem: add
`cucumber` to your Gemfile:
gem 'cucumber'
then install it:
$ bundle
or install the gem directly:
$ gem install cucumber
Later in this document, bundler is considered being used so all commands are using
`bundle exec`. If this is not the case for you, execute `cucumber` directly, without
`bundle exec`.
### Supported platforms
- Ruby 3.2
- Ruby 3.1
- Ruby 3.0
- Ruby 2.7
- TruffleRuby 22.0.0+
- JRuby 9.4+ (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/main/docs/jruby-limitations.md))
### Ruby on Rails
Using Ruby on Rails? You can use [cucumber-rails](https://github.com/cucumber/cucumber-rails) to bring Cucumber into your Rails project.
## Usage
### Initialization
If you need to, initialize your `features` directory with
$ bundle exec cucumber --init
This will create the following directories and files if they do not exist already:
features
step_definitions
support
env.rb
### Create your specification
Create a file named `rule.feature` in the `features` directory with:
```gherkin
# features/rule.feature
Feature: Rule Sample
Rule: This is a rule
Example: A passing example
Given this will pass
When I do an action
Then some results should be there
Example: A failing example
Given this will fail
When I do an action
Then some results should be there
```
### Automate your specification
And a file named `steps.rb` in `features/step_definitions` with:
```ruby
# features/step_definitions/steps.rb
Given('this will pass') do
@this_will_pass = true
end
Given('this will fail') do
@this_will_pass = false
end
When('I do an action') do
:no_op
end
Then("some results should be there") do
expect(@this_will_pass).to be true
end
```
### Run Cucumber
$ bundle exec cucumber
To execute a single feature file:
$ bundle exec cucumber features/rule.feature
To execute a single example, indicates the line of the name of the example:
$ bundle exec cucumber features/rule.feature:5
To summarize the results on the standard output, and generate a HTML report on disk:
$ bundle exec cucumber --format summary --format html --out report.html
For more command line options
$ bundle exec cucumber --help
You can also find documentation on the command line possibilities in [features/docs/cli](features/docs/cli).
## Documentation and support
- Getting started, writing features, step definitions, and more: https://cucumber.io/docs
- Ruby API Documentation: http://www.rubydoc.info/github/cucumber/cucumber-ruby/
- Community support forum: https://github.com/orgs/cucumber/discussions
- Discord: [register for an account](https://cucumber.io/docs/community/get-in-touch#discord)
## Copyright
Copyright (c) Cucumber Ltd. and Contributors. See LICENSE for details.