Sha256: 656eaa1a958713631fe809d2f45b524dc5852995c9225f0914454e0ed877d064
Contents?: true
Size: 737 Bytes
Versions: 8
Compression:
Stored size: 737 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') class ValidatesAcceptanceOfTest < Test::Unit::TestCase test "valid acceptance" do validation = Validatable::ValidatesAcceptanceOf.new stub, :acceptance instance = stub(:acceptance=>'true') assert_equal true, validation.valid?(instance) end test "invalid acceptance" do validation = Validatable::ValidatesAcceptanceOf.new stub, :acceptance instance = stub(:acceptance=>'false') assert_equal false, validation.valid?(instance) end expect true do options = {:message => nil, :if => nil, :times => nil, :level => nil, :groups => nil} Validatable::ValidatesAcceptanceOf.new(stub, :test).must_understand(options) end end
Version data entries
8 entries across 8 versions & 1 rubygems