File: reader_spec.rb

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

describe DataObjects::Reader do
  subject { command.execute_reader }

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

  after { connection.close }

  context 'should define a standard API' do

    it { should be_a(Enumerable)    }

    it { should respond_to(:close)  }
    it { should respond_to(:next!)  }
    it { should respond_to(:values) }
    it { should respond_to(:fields) }
    it { should respond_to(:each)   }
  end

end