Module: ChefSpec

Extended by:
ChefSpec
Included in:
ChefSpec
Defined in:
lib/chefspec.rb,
lib/chefspec/api.rb,
lib/chefspec/util.rb,
lib/chefspec/cacher.rb,
lib/chefspec/errors.rb,
lib/chefspec/macros.rb,
lib/chefspec/runner.rb,
lib/chefspec/version.rb,
lib/chefspec/coverage.rb,
lib/chefspec/matchers.rb,
lib/chefspec/renderer.rb,
lib/chefspec/berkshelf.rb,
lib/chefspec/formatter.rb,
lib/chefspec/librarian.rb,
lib/chefspec/stubs/stub.rb,
lib/chefspec/deprecations.rb,
lib/chefspec/deprecations.rb,
lib/chefspec/stubs/registry.rb,
lib/chefspec/mixins/normalize.rb,
lib/chefspec/stubs/search_stub.rb,
lib/chefspec/stubs/command_stub.rb,
lib/chefspec/stubs/data_bag_stub.rb,
lib/chefspec/stubs/search_registry.rb,
lib/chefspec/stubs/command_registry.rb,
lib/chefspec/stubs/data_bag_registry.rb,
lib/chefspec/stubs/data_bag_item_stub.rb,
lib/chefspec/stubs/data_bag_item_registry.rb,
lib/chefspec/expect_exception.rb,
lib/chefspec/server.rb

Defined Under Namespace

Modules: API, Cacher, Error, Macros, Matchers, Normalize, Stubs, Util Classes: Berkshelf, ChefFormatter, ChefRunner, Coverage, ExpectException, Librarian, Renderer, Runner, Server

Constant Summary collapse

VERSION =
'3.1.4'

Instance Method Summary collapse

Instance Method Details

#rootPathname

The source root of the ChefSpec gem. This is useful when requiring files that are relative to the root of the project.

Returns:

  • (Pathname)


45
46
47
# File 'lib/chefspec.rb', line 45

def root
  @root ||= Pathname.new(File.expand_path('../../', __FILE__))
end