Permalink
Browse files

Add spec for MiniTest::Chef::Spec.

Ensure MiniTest::Chef::Assertions is included.
  • Loading branch information...
1 parent 0378383 commit 0ae0d544b328cd9706a237c3d108f11b1a5a2fa0 @acrmp acrmp committed Oct 22, 2012
Showing with 19 additions and 0 deletions.
  1. +1 −0 lib/minitest-chef-handler/spec.rb
  2. +18 −0 spec/minitest-chef-handler/spec_spec.rb
@@ -1,6 +1,7 @@
module MiniTest
module Chef
require 'minitest/spec'
+ require 'minitest-chef-handler/assertions'
class Spec < MiniTest::Spec
include Assertions
@@ -0,0 +1,18 @@
+require File.expand_path('../../spec_helper', __FILE__)
+
+describe MiniTest::Chef::Spec do
+
+ let(:spec) { Class.new(MiniTest::Chef::Spec).new(:sample_spec) }
+
+ it "makes the node object available" do
+ spec.must_respond_to(:node)
+ end
+
+ it "makes minitest-chef-handler assertions available" do
+ spec.must_respond_to(:assert_installed)
+ end
+
+ it "makes minitest-chef-handler resource helpers available" do
+ spec.must_respond_to(:package)
+ end
+end

0 comments on commit 0ae0d54

Please sign in to comment.