~ubuntu-branches/ubuntu/oneiric/puppet/oneiric-security

« back to all changes in this revision

Viewing changes to spec/spec_helper.rb

  • Committer: Bazaar Package Importer
  • Author(s): Micah Anderson
  • Date: 2008-07-26 15:43:45 UTC
  • mfrom: (1.1.8 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080726154345-c03m49twzxewdwjn
Tags: 0.24.5-2
* Fix puppetlast to work with 0.24.5
* Adjust logcheck to match against new log messages in 0.24.5
* Update standards version to 3.8.0 (no changes)
* Update changelog to reduce length of line to make lintian happy

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dir = File.expand_path(File.dirname(__FILE__))
 
2
 
 
3
$LOAD_PATH.unshift("#{dir}/")
 
4
$LOAD_PATH.unshift("#{dir}/../lib")
 
5
$LOAD_PATH.unshift("#{dir}/../test/lib")  # Add the old test dir, so that we can still find our local mocha and spec
 
6
 
 
7
# include any gems in vendor/gems
 
8
Dir["#{dir}/../vendor/gems/**"].each do |path| 
 
9
    libpath = File.join(path, "lib")
 
10
    if File.directory?(libpath)
 
11
        $LOAD_PATH.unshift(libpath)
 
12
    else
 
13
        $LOAD_PATH.unshift(path)
 
14
    end
 
15
end
 
16
 
 
17
require 'puppettest'
 
18
require 'puppettest/runnable_test'
 
19
require 'mocha'
 
20
require 'spec'
 
21
 
 
22
# load any monkey-patches
 
23
Dir["#{dir}/monkey_patches/*.rb"].map { |file| require file }
 
24
 
 
25
Spec::Runner.configure do |config|
 
26
    config.mock_with :mocha
 
27
 
 
28
#  config.prepend_before :all do
 
29
#      setup_mocks_for_rspec
 
30
#      setup() if respond_to? :setup
 
31
#  end
 
32
#
 
33
#  config.prepend_after :all do
 
34
#      teardown() if respond_to? :teardown
 
35
#  end
 
36
end