Sha256: 9eb4c799b3911ad37edc58e2858d2a38ee847814dc12066f30d04ceac4a9a15a

Contents?: true

Size: 1.3 KB

Versions: 8

Compression:

Stored size: 1.3 KB

Contents

require 'awestruct/cli/deploy'

describe Awestruct::CLI::Deploy do

  it "should use a given deploy[:type]" do
    deployer = Awestruct::CLI::Deploy.new({}, {'type' => :foo})
    deployer.deploy_type.should == :foo
  end

  it "should use rsync if no deploy[:type] is given" do
    deployer = Awestruct::CLI::Deploy.new({}, {})
    deployer.deploy_type.should == :rsync
  end

  it "should use github_pages if deploy['host'] is github_pages and no deploy[:type] is given" do
    deployer = Awestruct::CLI::Deploy.new({}, {'host' => :github_pages})
    deployer.deploy_type.should == :github_pages
  end

  it "should use a given deploy['type'] even if deploy['host'] is github_pages" do
    deployer = Awestruct::CLI::Deploy.new({}, {'type' => :foo, 'host'=>:github_pages})
    deployer.deploy_type.should == :foo
  end

  it "should use s3 if deploy['type'] is s3" do
    deployer = Awestruct::CLI::Deploy.new({}, {'type' => :s3})
    deployer.deploy_type.should == :s3
  end

  it "should work with strings for keys" do
    deployer = Awestruct::CLI::Deploy.new({}, {'host' => :github_pages})
    deployer.deploy_type.should == :github_pages
  end

  it "should work with strings for values" do
    deployer = Awestruct::CLI::Deploy.new({}, {'host' => 'github_pages'})
    deployer.deploy_type.should == :github_pages
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awestruct-0.5.4.beta1 spec/deploy_spec.rb
awestruct-0.5.3 spec/deploy_spec.rb
awestruct-0.5.2.1 spec/deploy_spec.rb
awestruct-0.5.2 spec/deploy_spec.rb
awestruct-0.5.1 spec/deploy_spec.rb
awestruct-0.5.1a spec/deploy_spec.rb
awestruct-0.5.0 spec/deploy_spec.rb
awestruct-0.5.0.cr spec/deploy_spec.rb