Sha256: 8c2988a86d0c7c73c29301d31c756efd139c100e7e1a8a26e535cce5fe8b7030
Contents?: true
Size: 1.88 KB
Versions: 51
Compression:
Stored size: 1.88 KB
Contents
require 'spec_helper' describe EY::Serverside::Adapter::Deploy do it_should_behave_like "it installs engineyard-serverside" it_should_behave_like "it accepts app" it_should_behave_like "it accepts framework_env" it_should_behave_like "it accepts instances" it_should_behave_like "it accepts migrate" it_should_behave_like "it accepts ref" it_should_behave_like "it accepts repo" it_should_behave_like "it accepts stack" it_should_behave_like "it accepts verbose" it_should_require :app it_should_require :instances it_should_require :framework_env it_should_require :ref it_should_require :repo it_should_require :stack it_should_behave_like "it treats config as optional" it_should_behave_like "it treats migrate as optional" context "with valid arguments" do let(:command) do adapter = described_class.new do |arguments| arguments.app = "rackapp" arguments.framework_env = 'production' arguments.config = {'a' => 1} arguments.instances = [{:hostname => 'localhost', :roles => %w[han solo], :name => 'chewie'}] arguments.migrate = 'rake db:migrate' arguments.ref = 'master' arguments.repo = 'git@github.com:engineyard/engineyard-serverside.git' arguments.stack = "nginx_unicorn" end last_command(adapter) end it "puts the config in the command line as json" do command.should =~ /--config '#{Regexp.quote '{"a":1}'}'/ end it "invokes exactly the right command" do command.should == "engineyard-serverside _#{EY::Serverside::Adapter::ENGINEYARD_SERVERSIDE_VERSION}_ deploy --app rackapp --config '{\"a\":1}' --framework-env production --instance-names localhost:chewie --instance-roles localhost:han,solo --instances localhost --migrate 'rake db:migrate' --ref master --repo git@github.com:engineyard/engineyard-serverside.git --stack nginx_unicorn" end end end
Version data entries
51 entries across 51 versions & 1 rubygems