Sha256: d90e4a4d4592afd2b7fc89cbca5da139e12ad6ecfab02c55e4ff5d4235924d5d

Contents?: true

Size: 948 Bytes

Versions: 1

Compression:

Stored size: 948 Bytes

Contents

# -*- encoding: utf-8 -*-
shared_examples_for "supports multibyte" do
  describe :multibyte do
    it "works one-by-one" do
      upsert = Upsert.new connection, :pets
      assert_creates(Pet, [{:name => 'I♥NY', :gender => 'périferôl'}]) do
        upsert.row({:name => 'I♥NY'}, {:gender => 'périferôl'})
      end
    end
    it "works serially" do
      upsert = Upsert.new connection, :pets
      assert_creates(Pet, [{:name => 'I♥NY', :gender => 'jÚrgen'}]) do
        upsert.row({:name => 'I♥NY'}, {:gender => 'périferôl'})
        upsert.row({:name => 'I♥NY'}, {:gender => 'jÚrgen'})
      end
    end
    it "works multi" do
      assert_creates(Pet, [{:name => 'I♥NY', :gender => 'jÚrgen'}]) do
        Upsert.new(connection, :pets).multi do |xxx|
          xxx.row({:name => 'I♥NY'}, {:gender => 'périferôl'})
          xxx.row({:name => 'I♥NY'}, {:gender => 'jÚrgen'})
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
upsert-0.1.0 test/shared/multibyte.rb