Your example doesn’t seem to work, according to ruby-docs the 2 line method is the most efficient however, I could be doing it wrong.

From: Brett Weaver [mailto:notifications@github.com]
Sent: Monday, February 18, 2013 8:10 PM
To: intuit/simple_deploy
Cc: Young, Kevin
Subject: Re: [simple_deploy] To address issue 149,150 and 155 for simple deploy, Capistrano error handling (#154)


In spec/stack/ssh_spec.rb:

>      it "should return false when no running instances running" do

> -      options = { :config      => @config_mock,

> -                  :instances   => [],

> -                  :environment => 'test-env',

> -                  :ssh_user    => 'user',

> -                  :ssh_key     => 'key',

> -                  :stack       => @stack_mock,

> -                  :name        => 'test-stack' }

> -      @ssh = SimpleDeploy::Stack::SSH.new options

> +      options_override = { :instances   => [] }

> +      @ssh = SimpleDeploy::Stack::SSH.new @options.merge options_override

This can probably be merged further onto one line

SimpleDeploy::Stack::SSH.new @options.merge { :instances => [] }

—
Reply to this email directly or view it on GitHub<https://github.com/intuit/simple_deploy/pull/154/files#r3056934>.