Sha256: 214e3de8589a4aad4f3c2f4af0a7260295c6d5a09c5a91af08a94a35e00126a8

Contents?: true

Size: 587 Bytes

Versions: 3

Compression:

Stored size: 587 Bytes

Contents

shared 'supporting Array' do

  setup_test_environment

  before do
    @connection = DataObjects::Connection.new(CONFIG.uri)
  end

  after do
    @connection.close
  end

  describe 'passing an Array as a parameter in execute_reader' do

    before do
      @reader = @connection.create_command("SELECT * FROM widgets WHERE id in ?").execute_reader([2,3,4,5])
    end

    after do
      @reader.close
    end

    it 'should return correct number of rows' do
      counter  = 0
      while(@reader.next!) do
        counter += 1
      end
      counter.should == 4
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
data_objects-0.10.3 lib/data_objects/spec/typecast/array_spec.rb
data_objects-0.10.2 lib/data_objects/spec/typecast/array_spec.rb
data_objects-0.10.1 lib/data_objects/spec/typecast/array_spec.rb