Best way to test validates_acceptance_of

Hello,

I am trying to write a test to make sure that the property
validates_acceptance_of is present on a model. In my exploration, I
can’t
seem to make a test that fails when this property is absent, then passes
when added.

Any guidance would be appreciated!

~Erik L.

On May 4, 2011, at 1:24 PM, Erik Lindblom wrote:

Hello,

I am trying to write a test to make sure that the property
validates_acceptance_of is present on a model. In my exploration, I can’t seem to
make a test that fails when this property is absent, then passes when added.

Any guidance would be appreciated!

Per
http://stackoverflow.com/questions/5886961/best-way-to-test-validates-acceptance-of-with-rspec

Gemfile

gem ‘shoulda’, :group => :test

thing_spec.rb

require ‘spec_helper’

describe Thing do
it { should validate_acceptance_of(:tos) }
end