Sha256: c62bc2607c50c02903406ef8ef53d0f319a7fdc9718714c186a5625fb0c62ad7
Contents?: true
Size: 721 Bytes
Versions: 21
Compression:
Stored size: 721 Bytes
Contents
require 'helper' #Literally checking that the acts_as_cleo tag takes args and sets them as expected class TestActsAsMethods < Test::Unit::TestCase should "respond to and return as_cleo" do book = Book.new(:name => 'Wedge\'s Life', :author => "Luke Skywalker") assert_equal %w{name author}, book.cleo_config[:terms] assert_equal "name", book.cleo_config[:name] assert_equal "Book", book.cleo_config[:type] end should "exclude terms by default" do movie = Movie.create(:name => "A New Hope", :description => "The Best") assert_equal %w{name description}, movie.cleo_config[:terms] assert_equal "id", movie.cleo_config[:score] assert_equal "name", movie.cleo_config[:name] end end
Version data entries
21 entries across 21 versions & 1 rubygems