require 'test_helper' class PageTest < ActiveSupport::TestCase def test_pages pages = Page.all assert pages.count > 10, "Fixture did not load" end def test_last_10_order pages = Page.last_ten times = pages.map(&:updated_at) assert_equal 10, times.count assert_equal times.sort.reverse, times assert times.last < times.first, 'Sort order should be descending' end end