Sha256: d08d4a207e02002a8c252f38f0f6c8934843bc2c6e680978d080a3456529acb6
Contents?: true
Size: 600 Bytes
Versions: 3
Compression:
Stored size: 600 Bytes
Contents
require 'spec_helper' describe Itiel::Extract::DatabaseTable do before :each do @step = Itiel::Extract::DatabaseTable.new @step.connection = :test @step.table_name = 'table_name' end describe "#extract" do it "returns all the rows in the specified database table" do result = double db = { table_name: result } allow(result).to receive(:all).and_return double expect(Itiel::Extract::DatabaseTable). to receive(:sequel_connection). with(:test).and_return db expect(@step.extract).to eq result.all end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
itiel-0.1.2 | spec/extract/database_table_spec.rb |
itiel-0.1.1 | spec/extract/database_table_spec.rb |
itiel-0.1.0 | spec/extract/database_table_spec.rb |