diff options
author | Dan Bode <dan@puppetlabs.com> | 2010-06-21 09:30:30 -0700 |
---|---|---|
committer | Dan Bode <dan@puppetlabs.com> | 2010-06-21 09:30:30 -0700 |
commit | fe6b50e0383af01023f010b26cd1cf2fa2f3c9c4 (patch) | |
tree | 00ddb55d3da661be666105cdfa9b7bdc8629f056 /spec/unit/puppet/provider/ec2/ec2.rb | |
parent | 38e373fc67ff7447eb1052a40979d1e9df5934ba (diff) |
just getting started with unit tests for sudo.
Diffstat (limited to 'spec/unit/puppet/provider/ec2/ec2.rb')
-rw-r--r-- | spec/unit/puppet/provider/ec2/ec2.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/unit/puppet/provider/ec2/ec2.rb b/spec/unit/puppet/provider/ec2/ec2.rb new file mode 100644 index 0000000..1846147 --- /dev/null +++ b/spec/unit/puppet/provider/ec2/ec2.rb @@ -0,0 +1,40 @@ +Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") } + +provider_class = Puppet::Type.type(:ec2).provider(:ec2) + +describe provider_class do + before do + @resource = stub("resource") + @provider = provider_class.new(@resource) + end + +# it "should not be suitable if the 'aws' libraries are missing" do +# Puppet.features.expects(:aws?).returns false +# provider_class.should_not be_suitable +# end + +# it "should be suitable if the 'aws' libraries are present" do +# Puppet.features.expects(:aws?).returns true +# provider_class.should be_suitable +# end + +# it "should be present if provided an 'ensure' value of 'present'" do +# provider_class.new(:ensure => :present).should be_exists +# end +# +# it "should be absent if provided an 'ensure' value of 'absent'" do +# provider_class.new(:ensure => :absent).should_not be_exists +# end +# +# it "should be absent if not provided an 'ensure' value" do +# provider_class.new({}).should_not be_exists +# end +# +# it "should be absent if provided with a resource rather than an 'ensure' value" do +# provider_class.new(@resource).should_not be_exists +# end + +# it "should accept an instance_id at initialization" do +# provider_class.new(:instance_id => 50).instance_id.should == 50 +# end +end |