module ActiveModel::Lint::Tests
def test_persisted?
will route to the create action. If it is persisted, a form for the
If the object is not persisted, a form for that object, for instance,
persisted? is used when calculating the URL for an object.
calling this method returns either +true+ or +false+. Fails otherwise.
Passes if the object's model responds to persisted? and if
def test_persisted? assert model.respond_to?(:persisted?), "The model should respond to persisted?" assert_boolean model.persisted?, "persisted?" end