Sha256: 0b2ad6c5906523114425c5872b785324178f7f9041e1094a7942e888598cfe45
Contents?: true
Size: 1.58 KB
Versions: 22
Compression:
Stored size: 1.58 KB
Contents
require 'spec_helper' describe SimplerWorkflow do let(:client) { AWS.config.simple_workflow_client } let(:describe_domain_response) { client.stub_for(:describe_domain) } let(:list_domains_response) { client.stub_for(:list_domains) } let(:domain) { SimplerWorkflow.domain("test-domain") } let(:domain_desc) {{ 'configuration' => { 'workflowExecutionRetentionPeriodInDays' => '2' }, 'domainInfo' => { 'name' => domain.name, 'description' => 'desc', 'status' => 'REGISTERED', }, }} let(:domains_desc) { { 'domainInfos' => [ domain_desc['domainInfo'] ] } } context "Referring to a domain" do before :each do describe_domain_response.stub(:data).and_return(domain_desc) client.stub(:describe_domain).and_return(describe_domain_response) list_domains_response.stub(:data).and_return(domains_desc) client.stub(:list_domains).and_return(list_domains_response) end it "should return the domain for the test" do domain.should_not be_nil domain.should be_a(SimplerWorkflow::Domain) end it "should provide the domain name" do domain.name.should == "test-domain" end it "should show the default retention period" do domain.retention_period.should == 2 end end context "getting a handle to the SimpleWorkflow API" do let(:swf) { SimplerWorkflow.swf } it "should return the SWF handle" do swf.should be_a AWS::SimpleWorkflow end it "should have the same configuration as AWS" do swf.config.should == AWS.config end end end
Version data entries
22 entries across 22 versions & 1 rubygems