Sha256: 8b0db81af50bcccccb0949f603d71affe3d9dd1acc04f36c69500644f01364ec

Contents?: true

Size: 780 Bytes

Versions: 1

Compression:

Stored size: 780 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).
              with('select * from `name`').
              and_return result 
    @sdb_mock.should_receive(:delete).with 'name', 'item1'
    @purge.purge
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sdbport-0.1.0 spec/domain/purge_spec.rb