Sha256: 4ff3f50bf8ce19932b176d45571597279a448f5e71314353b651862228c0ca80
Contents?: true
Size: 721 Bytes
Versions: 12
Compression:
Stored size: 721 Bytes
Contents
require File.expand_path("../helper", __FILE__) class ConfigurationTest < MiniTest::Unit::TestCase include FriendlyId::Test def setup @model_class = Class.new(ActiveRecord::Base) end test "should set model class on initialization" do config = FriendlyId::Configuration.new @model_class assert_equal @model_class, config.model_class end test "should set options on initialization if present" do config = FriendlyId::Configuration.new @model_class, :base => "hello" assert_equal "hello", config.base end test "should raise error if passed unrecognized option" do assert_raises NoMethodError do FriendlyId::Configuration.new @model_class, :foo => "bar" end end end
Version data entries
12 entries across 12 versions & 2 rubygems