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

Version Path
sequel-4.49.0 spec/extensions/error_splitter_spec.rb
sequel-4.48.0 spec/extensions/error_splitter_spec.rb
tdiary-5.0.5 vendor/bundle/gems/sequel-4.44.0/spec/extensions/error_splitter_spec.rb
tdiary-5.0.5 vendor/bundle/gems/sequel-4.47.0/spec/extensions/error_splitter_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/sequel-4.44.0/spec/extensions/error_splitter_spec.rb
sequel-4.47.0 spec/extensions/error_splitter_spec.rb
sequel-4.46.0 spec/extensions/error_splitter_spec.rb
sequel-4.45.0 spec/extensions/error_splitter_spec.rb
tdiary-5.0.4 vendor/bundle/gems/sequel-4.44.0/spec/extensions/error_splitter_spec.rb
sequel-4.44.0 spec/extensions/error_splitter_spec.rb
sequel-4.43.0 spec/extensions/error_splitter_spec.rb
sequel-4.42.1 spec/extensions/error_splitter_spec.rb
sequel-4.42.0 spec/extensions/error_splitter_spec.rb
sequel-4.41.0 spec/extensions/error_splitter_spec.rb
sequel-4.40.0 spec/extensions/error_splitter_spec.rb
sequel-4.39.0 spec/extensions/error_splitter_spec.rb
tdiary-5.0.2 vendor/bundle/gems/sequel-4.37.0/spec/extensions/error_splitter_spec.rb
sequel-4.38.0 spec/extensions/error_splitter_spec.rb
sequel-4.37.0 spec/extensions/error_splitter_spec.rb
sequel-4.36.0 spec/extensions/error_splitter_spec.rb