mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00

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.
7 lines
243 B
Ruby
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
|