Sha256: de64da388b80619eeead289b2461675f5c7bb297427b453294deb9c82085f288

Contents?: true

Size: 650 Bytes

Versions: 24

Compression:

Stored size: 650 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

24 entries across 24 versions & 1 rubygems

Version Path
heirloom-0.12.1 spec/archive/lister_spec.rb
heirloom-0.12.0 spec/archive/lister_spec.rb
heirloom-0.11.2 spec/archive/lister_spec.rb
heirloom-0.11.1 spec/archive/lister_spec.rb
heirloom-0.11.0 spec/archive/lister_spec.rb
heirloom-0.11.0.beta.2 spec/archive/lister_spec.rb
heirloom-0.11.0.beta.1 spec/archive/lister_spec.rb
heirloom-0.10.1 spec/archive/lister_spec.rb
heirloom-0.10.0 spec/archive/lister_spec.rb
heirloom-0.9.0 spec/archive/lister_spec.rb
heirloom-0.8.3 spec/archive/lister_spec.rb
heirloom-0.8.2 spec/archive/lister_spec.rb
heirloom-0.8.1 spec/archive/lister_spec.rb
heirloom-0.8.0 spec/archive/lister_spec.rb
heirloom-0.7.4 spec/archive/lister_spec.rb
heirloom-0.7.3 spec/archive/lister_spec.rb
heirloom-0.7.3rc2 spec/archive/lister_spec.rb
heirloom-0.7.3rc1 spec/archive/lister_spec.rb
heirloom-0.7.2 spec/archive/lister_spec.rb
heirloom-0.7.2rc2 spec/archive/lister_spec.rb