Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Section A.6. Lint::Tests

A.6. Lint::Tests

You can check whether an object is compatible with the Active Model API by including ActiveModel::Lint::Tests. It contains assertions that tell you whether your object is fully compliant.

The tests only check compatibility. They do not attempt to determine the correctness of the returned values. For instance, you could implement valid? to always return true and the tests would still pass. It is up to you to ensure that the values are correct.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint