instance method test_valid?

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

test_valid?()

Responds to valid?

Returns a boolean that specifies whether the object is in a valid or invalid state.

Source
# File activemodel/lib/active_model/lint.rb, line 60
      def test_valid?
        assert model.respond_to?(:valid?), "The model should respond to valid?"
        assert_boolean model.valid?, "valid?"
      end

Defined in activemodel/lib/active_model/lint.rb line 60 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Lint::Tests

Type at least 2 characters to search.

↑↓ navigate · open · esc close