Seems like this should be findable with a couple of Google searches...but no luck.
I'm looking for an elegant approach to testing validates_associated in my models, such as...
class Network < ActiveRecord::Base
...
validates_associated :transporter
...
end
And the test:
class NetworkTest < ActiveSupport::TestCase
test 'should not create network without valid transporter' do
network = Factory.build(:network)
assert...?
end
end