1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/test/unit/address_test.rb
Nathan Sutton 911b2f7cb4 Scoping of uniqueness validations on multiple attributes
Previously the :scoped_to option on the 'should_require_unique_attributes'
only allowed a single attribute to scope uniqueness.  This adds the ability to
scope to multiple attributes.  This also improves the documentation for the
method.
2008-05-29 16:48:39 -07:00

7 lines
243 B
Ruby

require File.dirname(__FILE__) + '/../test_helper'
class AddressTest < Test::Unit::TestCase
load_all_fixtures
should_belong_to :addressable
should_require_unique_attributes :title, :scoped_to => [:addressable_id, :addressable_type]
end