lib/generators/dry_crud/templates/test/custom_assertions.rb
# Asserts that the given active model record is valid.
# This method used to be part of Rails but was deprecated, no idea why.
Asserts that the given active model record is valid.
This method used to be part of Rails but was deprecated, no idea why.
Asserts that the given active model record is valid . This method used to be part of Rails but was deprecated no idea why .
def assert_valid(record, message = "")
    record.valid?
    full_message = build_message(message,
        "? expected to be valid, but has the following errors: \n ?.",
       record.to_s, record.errors.full_messages.join("\n"))
    assert_block(full_message) { record.valid? }
  end
def assert_valid ( record , message = "" ) record . valid? full_message = build_message ( message , "? expected to be valid, but has the following errors: \n ?." , record . to_s , record . errors . full_messages . join ( "\n" ) ) assert_block ( full_message ) { record . valid? } end
Asserts that the given active model record is valid.
Asserts that the given active model record is valid .
record
message