Sha256: 519a5601251abc183fc184949a7b0b6ec75d74c199a0ca6488596a3aa383579d

Contents?: true

Size: 798 Bytes

Versions: 6

Compression:

Stored size: 798 Bytes

Contents

require 'spec_helper'

describe Sdbport do
  before do
    @logger_stub = logger_stub
    @sdb_mock = sdb_mock
    @purge = Sdbport::Domain::Purge.new :name       => 'name',
                                        :logger     => @logger_stub,
                                        :access_key => 'the-key',
                                        :secret_key => 'the-secret',
                                        :region     => 'us-west-1'
  end

  it "should puge the given domain" do
    result = { 'item1' =>
               { 'attribute' => [ 'value' ] }
             }
    @sdb_mock.should_receive(:select_and_follow_tokens).
              with('select * from `name`').
              and_return result 
    @sdb_mock.should_receive(:delete).with 'name', 'item1'
    @purge.purge
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sdbport-0.4.1 spec/domain/purge_spec.rb
sdbport-0.4.0 spec/domain/purge_spec.rb
sdbport-0.3.0 spec/domain/purge_spec.rb
sdbport-0.2.1 spec/domain/purge_spec.rb
sdbport-0.2.0 spec/domain/purge_spec.rb
sdbport-0.1.1 spec/domain/purge_spec.rb