Sha256: 18a980d01678455db9a351365fd7a338c89672a28afc809cf6a8b1ebe8c36974

Contents?: true

Size: 648 Bytes

Versions: 8

Compression:

Stored size: 648 Bytes

Contents

require 'spec_helper'

describe Heirloom do

  before do
    @config_mock = double 'config'
    @lister = Heirloom::Lister.new :config => @config_mock,
                                   :name     => 'test123'
  end

  it "should list the known archive" do
    sdb_mock = mock 'sdb'
    @lister.should_receive(:sdb).and_return sdb_mock
    sdb_mock.should_receive(:select).
             with("select * from heirloom_test123 where built_at > '2000-01-01T00:00:00.000Z' \
                 order by built_at desc limit 10").
             and_return( {'1' => 'one', '2' => 'two', '3' => 'three'} )
    @lister.list.should == ['1', '2', '3']
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
heirloom-0.6.1 spec/archive/lister_spec.rb
heirloom-0.6.0rc1 spec/archive/lister_spec.rb
heirloom-0.5.0rc4 spec/archive/lister_spec.rb
heirloom-0.5.0rc3 spec/archive/lister_spec.rb
heirloom-0.5.0rc2 spec/archive/lister_spec.rb
heirloom-0.5.0rc1 spec/archive/lister_spec.rb
heirloom-0.4.1rc1 spec/archive/lister_spec.rb
heirloom-0.4.0 spec/archive/lister_spec.rb