Sha256: 75a58acecb7f6ddc34569913e73a88c9547233f1bdbbba3822f53890a9cf22cd
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' describe Heirloom::Catalog::Show do before do @config_double = double 'config' @sdb_double = double 'sdb' Heirloom::AWS::SimpleDB.should_receive(:new). with(:config => @config_double). and_return @sdb_double @show = Heirloom::Catalog::Show.new :config => @config_double, :name => 'a_archive' end it "should return the bucket_prefix" do result = { 'heirloom_a_archive' => { 'bucket_prefix' => [ 'bp' ] } } @sdb_double.should_receive(:select). with("select bucket_prefix from heirloom where itemName() = 'heirloom_a_archive'"). and_return result @show.bucket_prefix.should == 'bp' end it "should return the regions" do regions = ['us-west-1', 'us-west-2'] result = { 'heirloom_a_archive' => { 'regions' => @regions } } @sdb_double.should_receive(:select). with("select regions from heirloom where itemName() = 'heirloom_a_archive'"). and_return result @show.regions.should == @regions end end
Version data entries
5 entries across 5 versions & 1 rubygems