rspec-rails
https://github.com/rspec/rspec-rails
Ruby
RSpec for Rails 5+
RSpec::Rails::Matchers#be_valid
Passes if the given model instance's `valid?` method is true, meaning all of the `ActiveModel::Validations` passed and no errors exist. If a message is not given, a default message is shown listing each error.
Edit
git clone [email protected]:rspec/rspec-rails.git
cd rspec-rails
open lib/rspec/rails/matchers/be_valid.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-RSpec--Rails--Matchers-be_valid-for-pr
# Commit to gitgit add lib/rspec/rails/matchers/be_valid.rbgit commit -m "better docs for RSpec::Rails::Matchers#be_valid"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-RSpec--Rails--Matchers-be_valid-for-pr
hub pull-request
# Celebrate!