Method: RSpec::Rails::Matchers#be_valid

Defined in:
lib/rspec/rails/matchers/be_valid.rb

#be_valid(*args) ⇒ Object

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.

Examples:

thing = Thing.new
expect(thing).to be_valid


44
45
46
# File 'lib/rspec/rails/matchers/be_valid.rb', line 44

def be_valid(*args)
  BeValid.new(*args)
end