Sha256: 24d9dcd3ea60243a1ca40b417681b54a8cedc0d3c9f37e515680e7d2c060d3fb
Contents?: true
Size: 458 Bytes
Versions: 19
Compression:
Stored size: 458 Bytes
Contents
require 'helper' describe Toy::RecordInvalid do uses_constants('User') before do User.attribute(:name, String) User.attribute(:age, Integer) User.validates_presence_of(:name) User.validates_presence_of(:age) end it "should include a message of the errors" do user = User.new user.should_not be_valid Toy::RecordInvalid.new(user).message.should == "Invalid record: Name can't be blank and Age can't be blank" end end
Version data entries
19 entries across 19 versions & 1 rubygems