File: reader_spec.rb

package info (click to toggle)
libdataobjects-ruby 0.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 336 kB
  • ctags: 200
  • sloc: ruby: 2,729; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))

describe DataObjects::Reader do

  it "should define a standard API" do
    connection = DataObjects::Connection.new('mock://localhost')

    command = connection.create_command("SELECT * FROM example")

    reader = command.execute_reader

    reader.should.be.kind_of(Enumerable)

    reader.should.respond_to(:close)
    reader.should.respond_to(:next!)
    reader.should.respond_to(:values)
    reader.should.respond_to(:fields)
    reader.should.respond_to(:each)

    connection.close
  end

end