Sha256: 29e3728260123e2e35ec1f09d03d52b9d770d1f8ded3c14d945070209ab11718
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. require 'spec_helper' require 'stringio' require 'logger' module Aws module SessionStore module DynamoDB describe Table do context "Mock Table Methods Tests", :integration => true do let(:table_name) { "sessionstore-integration-test-#{Time.now.to_i}" } let(:options) { {:table_name => table_name} } let(:io) { StringIO.new } before { Table.stub(:logger) { Logger.new(io) } } it "Creates and deletes a new table" do Table.create_table(options) # second attempt should warn Table.create_table(options) io.string.should include("Table #{table_name} created, waiting for activation...\n") io.string.should include("Table #{table_name} is now ready to use.\n") io.string.should include("Table #{table_name} already exists, skipping creation.\n") # now delete table Table.delete_table(options) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aws-sessionstore-dynamodb-1.0.0 | spec/aws/session_store/dynamo_db/table_spec.rb |