Sha256: 5eb23a065b3d00f87f352ef4edb7f453132e770d272e55e6f5028fda0c2f7dbf

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

module MiniTest::Assertions
  def assert_contains_a_puppet_module(dir)
    assert Dir.exists?(dir), "Module folder #{dir} wasn't created"
    Dir.entries(dir).wont_be_empty
    Dir.entries(dir).must_include "manifests"
  end 

  def refute_git_repository(dir)
    Dir.entries(dir).wont_include ".git"
  end

  def assert_bundler_is_initialized_in(dir)
    assert Dir.entries(dir).include?(".bundle"), "Bundler hasn't been initialized in folder #{dir}"
  end
end

module MiniTest::Expectations
  infect_an_assertion :assert_contains_a_puppet_module, :must_contain_a_puppet_module, :only_one_argument
  infect_an_assertion :refute_git_repository, :wont_be_a_git_repository, :only_one_argument
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppetry_toolbox-0.0.4 test/lib/puppetry/test/custom_assertions.rb