Sha256: 0477e6c95d8494ecbbb761a6b57999c27fce64c1dda98d82075740679c78b736
Contents?: true
Size: 466 Bytes
Versions: 34
Compression:
Stored size: 466 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?.must_equal false @m.errors.must_equal(:a=>['is bad'], :b=>['is bad']) end end
Version data entries
34 entries across 32 versions & 2 rubygems