Sha256: dff91530b89a6dd6d97c48a1f0fc5af90d34460d128cc9b8c772e3d566c6451b

Contents?: true

Size: 656 Bytes

Versions: 6

Compression:

Stored size: 656 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

include PoolParty::Resources

describe "Variable" do
  before(:each) do
    reset!
    @variable = variable(:name => "name", :value => "ari Lerner")
  end
  it "should have a package" do
    resource(:variable).should_not be_empty
  end
  it "should have the 'name' variable set as a variable" do
    @variable.to_string.should =~ /\$name = 'ari Lerner'/
  end
  it "should be able to set the variable as an array if passed an array" do
    v = variable(:name => "girlfriends", :value => %w(Rachel Erica Michelle))
    v.to_string.should == "$girlfriends = [ 'Rachel', 'Erica', 'Michelle' ]"
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
auser-poolparty-0.2.3 spec/poolparty/pool/resources/variable_spec.rb
auser-poolparty-0.2.4 spec/poolparty/pool/resources/variable_spec.rb
auser-poolparty-0.2.5 spec/poolparty/pool/resources/variable_spec.rb
auser-poolparty-0.2.6 spec/poolparty/pool/resources/variable_spec.rb
auser-poolparty-0.2.8 spec/poolparty/pool/resources/variable_spec.rb
poolparty-0.2.6 spec/poolparty/pool/resources/variable_spec.rb