Sha256: 3d80e7209bd1d5d5bf9d3bfd75e7929108131a9604fa65cdaea998532c5908d3
Contents?: true
Size: 465 Bytes
Versions: 18
Compression:
Stored size: 465 Bytes
Contents
require File.join(File.dirname(File.expand_path(__FILE__)), "spec_helper") describe "Sequel::Plugins::ErrorSplitter" do before do @c = Class.new(Sequel::Model) @c.plugin :error_splitter @m = @c.new def @m.validate errors.add([:a, :b], 'is bad') end end it "should split errors for multiple columns and assign them to each column" do @m.valid?.should == false @m.errors.should == {:a=>['is bad'], :b=>['is bad']} end end
Version data entries
18 entries across 18 versions & 2 rubygems