Sha256: 76666c4fbe070da21ec63f3c5f17354433e64930af6d080e6e3ef778c88f25aa

Contents?: true

Size: 422 Bytes

Versions: 45

Compression:

Stored size: 422 Bytes

Contents

require_relative "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

45 entries across 41 versions & 2 rubygems

Version Path
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/sequel-5.26.0/spec/extensions/error_splitter_spec.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/sequel-5.29.0/spec/extensions/error_splitter_spec.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/sequel-5.26.0/spec/extensions/error_splitter_spec.rb
sequel-5.29.0 spec/extensions/error_splitter_spec.rb
sequel-5.28.0 spec/extensions/error_splitter_spec.rb
sequel-5.27.0 spec/extensions/error_splitter_spec.rb
tdiary-5.1.0 vendor/bundle/gems/sequel-5.26.0/spec/extensions/error_splitter_spec.rb
sequel-5.26.0 spec/extensions/error_splitter_spec.rb
sequel-5.25.0 spec/extensions/error_splitter_spec.rb
sequel-5.24.0 spec/extensions/error_splitter_spec.rb
sequel-5.23.0 spec/extensions/error_splitter_spec.rb
sequel-5.22.0 spec/extensions/error_splitter_spec.rb
sequel-5.21.0 spec/extensions/error_splitter_spec.rb
sequel-5.20.0 spec/extensions/error_splitter_spec.rb
tdiary-5.0.13 vendor/bundle/gems/sequel-5.18.0/spec/extensions/error_splitter_spec.rb
sequel-5.19.0 spec/extensions/error_splitter_spec.rb
tdiary-5.0.12.1 vendor/bundle/gems/sequel-5.18.0/spec/extensions/error_splitter_spec.rb
sequel-5.18.0 spec/extensions/error_splitter_spec.rb
sequel-5.17.0 spec/extensions/error_splitter_spec.rb
sequel-5.16.0 spec/extensions/error_splitter_spec.rb