{"id":20502018,"url":"https://github.com/majioa/shoulda-matchers-cucumber","last_synced_at":"2025-04-13T19:51:59.048Z","repository":{"id":56895418,"uuid":"258600375","full_name":"majioa/shoulda-matchers-cucumber","owner":"majioa","description":"Use shoulda matchers and rspec-expectations directly in cucumber","archived":false,"fork":false,"pushed_at":"2020-12-24T10:22:52.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T10:37:44.973Z","etag":null,"topics":["cucumber","rails","ruby","testing"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/majioa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-24T19:06:36.000Z","updated_at":"2021-02-10T03:18:35.000Z","dependencies_parsed_at":"2022-08-20T17:10:23.170Z","dependency_job_id":null,"html_url":"https://github.com/majioa/shoulda-matchers-cucumber","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majioa%2Fshoulda-matchers-cucumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majioa%2Fshoulda-matchers-cucumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majioa%2Fshoulda-matchers-cucumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majioa%2Fshoulda-matchers-cucumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/majioa","download_url":"https://codeload.github.com/majioa/shoulda-matchers-cucumber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248773837,"owners_count":21159520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cucumber","rails","ruby","testing"],"created_at":"2024-11-15T19:19:00.985Z","updated_at":"2025-04-13T19:51:59.027Z","avatar_url":"https://github.com/majioa.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shoulda Matchers for Cucumber\n\n[![Gem Version][version-badge]][rubygems] [![Build Status][travis-badge]][travis] [![MIT License][license-badge]](LICENSE) [![Total Downloads][downloads-total]][rubygems] [![Downloads][downloads-badge]][rubygems] [![Hound][hound-badge]][hound]\n\nThe gem to be used to support the [shoulda matchers](https://github.com/thoughtbot/shoulda-matchers) and [rspec expectation](https://github.com/rspec/rspec-expectations) syntaxes in the cucumber step methods, without picking up the whole rspec, or specifying the shoulda matchers.\n\n[version-badge]: https://img.shields.io/gem/v/shoulda-matchers-cucumber.svg\n[rubygems]: https://rubygems.org/gems/shoulda-matchers-cucumber\n[travis-badge]: https://img.shields.io/travis/majioa/shoulda-matchers-cucumber/master.svg\n[travis]: https://travis-ci.org/majioa/shoulda-matchers-cucumber\n[downloads-total]: https://img.shields.io/gem/dt/shoulda-matchers-cucumber.svg\n[downloads-badge]: https://img.shields.io/gem/dtv/shoulda-matchers-cucumber.svg\n[downloads-badge]: https://img.shields.io/gem/dtv/shoulda-matchers-cucumber.svg\n[hound-badge]: https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg\n[hound]: https://houndci.com\n[license-badge]: https://img.shields.io/badge/License-MIT-0000FF.png\n\n\n### RSpec-Expectations\n\nUse this instead of the RSpec ifself in case you just use the specific module gem\n'rspec-expectations' to test webpart(s).\n\nInclude `shoulda-matchers-cucumber` in your Gemfile:\n\n``` ruby\ngroup :test do\n   gem 'shoulda-matchers-cucumber'\nend\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install shoulda-matchers-cucumber\n\nNow you can use matchers in your tests as for Cucumber without picking-up the whole RSpec suite.\n\n## Configuring\nThen, configure the gem to integrate with RSpec specifying the test framework as `:cucumber`:\n\n``` ruby\nShoulda::Matchers.configure do |config|\n   config.integrate do |with|\n      with.test_framework :cucumber\n      # ...\n   end\nend\n```\n\n## Usage\n\nWrite your cucumer rules as usual:\n\n```cucumber\nFeature: User model\n\nScenario: Valid model of User\n   Given default User model\n   Then the model is valid\n```\n\nThen write its steps using shoulda matchers' syntax:\n\n```ruby\nGiven(\"default User model\") do\n   User.create(name: \"Vasja\")\nend\n\nThen(\"the model is valid\") do\n   expect(User.first).to validate_presence_of(:name)\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/majioa/shoulda-matchers-cucumber. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Shoulda::Matchers::Cucumber project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/majioa/shoulda-matchers-cucumber/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajioa%2Fshoulda-matchers-cucumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajioa%2Fshoulda-matchers-cucumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajioa%2Fshoulda-matchers-cucumber/lists"}