aboutsummaryrefslogblamecommitdiffstats
path: root/activemodel/test/cases/lint_test.rb
blob: 63804004ee9ea0d4f8d29a10f75cb70d8fcd0725 (plain) (tree)
1
2
3
4
5
6
7
8

                      



                                      

                              


                
 


                              
 






                                    
 

                               
     
   
require "cases/helper"

class LintTest < ActiveModel::TestCase
  include ActiveModel::Lint::Tests

  class CompliantModel
    extend ActiveModel::Naming

    def to_model
      self
    end

    def valid?()      true end
    def new_record?() true end
    def destroyed?()  true end

    def errors
      obj = Object.new
      def obj.[](key)         [] end
      def obj.full_messages() [] end
      obj
    end
  end

  def setup
    @model = CompliantModel.new
  end
end