Sha256: 2e350f6efa811b3305cfc66c79403a070b4ba2a50ca042e7f8ddc50cc684981a

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

require File.expand_path('../../../../spec_helper', __FILE__)
require 'taketo/constructs/command'

include Taketo

describe "Command" do
  let(:cmd) { Taketo::Constructs::Command.new(:the_command) }

  specify "#command= should set which command to execute" do
    cmd.command= "rails c"
    cmd.command.should == "rails c"
  end

  describe "#render" do
    it "should pick up server's environment variables and location" do
      server = mock(:Server, :environment_variables => { :FOO => "bar baz" }, :default_location => "/var/apps/the app")
      cmd.command = "rails c"
      cmd.render(server).should == "cd /var/apps/the\\ app; FOO=bar\\ baz rails c"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taketo-0.0.3 spec/lib/taketo/constructs/command_spec.rb
taketo-0.0.2 spec/lib/taketo/constructs/command_spec.rb