Sha256: 06c4ca3efaf5b71de627df7ef0b71099e4d9585c7ea09878a73dffa270a156cd
Contents?: true
Size: 869 Bytes
Versions: 63
Compression:
Stored size: 869 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' include PoolParty::Resources describe "Variable" do before(:each) do reset_resources! @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 it "should set the string to be without a string if it's a function" do v = variable(:name => "girlfriends", :value => "lookup_var()") v.to_string.should == "$girlfriends = lookup_var()" end end
Version data entries
63 entries across 63 versions & 2 rubygems