summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-04-26 14:16:17 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-04-26 14:16:17 -0700
commitddc4e148689233058827f32832195daa935a99e2 (patch)
treed2703076d0f97eb053030059e673dd957304451f /spec/unit
parent2cce3265885578910154854cf80ceb4d48ac631f (diff)
parentf656818bcd7cb88f24f6c578790771952120b1cc (diff)
downloadpuppet-ddc4e148689233058827f32832195daa935a99e2.tar.gz
puppet-ddc4e148689233058827f32832195daa935a99e2.tar.xz
puppet-ddc4e148689233058827f32832195daa935a99e2.zip
Merge branch 'tickets/2.6.next/4487' into 2.6.next
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/rails/host_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/rails/host_spec.rb b/spec/unit/rails/host_spec.rb
index 4244f117f..b413a16b8 100755
--- a/spec/unit/rails/host_spec.rb
+++ b/spec/unit/rails/host_spec.rb
@@ -2,6 +2,8 @@
require File.dirname(__FILE__) + '/../../spec_helper'
+require 'puppet/node/environment'
+
describe "Puppet::Rails::Host", :if => Puppet.features.rails? do
def column(name, type)
ActiveRecord::ConnectionAdapters::Column.new(name, nil, type, false)
@@ -43,6 +45,12 @@ describe "Puppet::Rails::Host", :if => Puppet.features.rails? do
Puppet::Rails::Host.from_puppet(@node)
end
+ it "should stringify the environment" do
+ host = Puppet::Rails::Host.new
+ host.environment = Puppet::Node::Environment.new("production")
+ host.environment.class.should == String
+ end
+
it "should copy the ipaddress from the Puppet instance" do
Puppet::Rails::Host.expects(:find_by_name).with("foo").returns @host