Skip to content

Useful matchers and shared examples for Rails projects

License

Notifications You must be signed in to change notification settings

buildgroundwork/rspec-common

Repository files navigation

Rspec::Common

🧐 Common additions and enhancements for Rails testing with RSpec.

Installation

Add this line to your application's Gemfile:

gem 'rspec-common'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install rspec-common

Usage

In your rails_helper.rb file:

  # To include all enhancements
  require "rspec/common/all"

or

  # To pick and choose which enhancements you would like:
  require "rspec/common/shared_examples/controllers"
  require "rspec/common/matchers/views/json"

NB: Requiring rspec/common/all does NOT include fixes for specific Rails versions.

  # To include fixes specific to Rails 7
  require "rspec/common/all"
  require "rspec/common/rails7_fixes"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/buildgroundwork/rspec-common.

License

The gem is available as open source under the terms of the MIT License.

About

Useful matchers and shared examples for Rails projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published