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_respond_to model, :persisted? assert_boolean model.persisted?, "persisted?" end