The project is in a healthy, maintained state
validate all objects at end of system spec
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

>= 0
>= 0
 Project Readme

RSpec::AllRecordsValidator

Check all ActiveRecord object validation after system spec.

This gem is designed for: rspec-rails

Setup

Install

Add this line to your application's Gemfile in test group:

group :test do
  gem 'rspec-all_records_validator'
end

And then execute:

$ bundle install

Configure

Add below to your spec_helper.rb

require 'rspec/all_records_validator'

RSpec.configure do |config|
  config.after type: :system do
    RSpec::AllRecordsValidator.validate!
  end
end

Avoid validation for specific model

You can avoid validation for specific models:

RSpec.configure do |config|
  config.after type: :system do
    RSpec::AllRecordsValidator.validate!(ignored_models: [DoNotValidateThisModel])
  end
end

For feature spec

You can config This setting for feature spec

RSpec.configure do |config|
  config.after type: :feature do
    RSpec::AllRecordsValidator.validate!
  end
end