Sha256: 8d96a08aefacd11992435ce35078a1dfcea70f7a3b19a6a60320d8f48985d278

Contents?: true

Size: 602 Bytes

Versions: 2

Compression:

Stored size: 602 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))

describe DataObjects::Result do
  subject { command.execute_non_query }

  let(:connection) { DataObjects::Connection.new('mock://localhost') }
  let(:command) { connection.create_command('SELECT * FROM example') }

  after { connection.close }

  context 'defines a standard API' do
    it 'provides the number of affected rows' do
      is_expected.to respond_to(:to_i)
      expect(subject.to_i).to eq 0
    end

    it 'provides the id of the inserted row' do
      is_expected.to respond_to(:insert_id)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sbf-data_objects-0.11.0 spec/result_spec.rb
sbf-data_objects-0.10.17 spec/result_spec.rb