Sha256: b7a053c006635ad12d104567304e7d12ff4e37e90dfecd88a86b6b8e31029395

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

dir = File.expand_path(File.dirname(__FILE__))
[ "#{dir}/../../lib", "#{dir}/../../test/lib"].each do |dir|
        fulldir = File.expand_path(dir)
        $LOAD_PATH.unshift(fulldir) unless $LOAD_PATH.include?(fulldir)
end

require 'spec'
require 'puppettest'
require 'puppettest/runnable_test'

module Spec
    module Runner
        class ExampleGroupRunner
            def run
                prepare
                success = true
                example_groups.each do |example_group|
                    unless example_group.runnable?
                        warn "Skipping unsuitable example group %s: %s" % [example_group.description, example_group.messages.join(", ")]
                        next
                    end
                    success = success & example_group.run(@options)
                    Puppet.settings.clear
                end
                return success
            ensure
                finish
            end
        end
    end
end

module Spec
    module Example
        class ExampleGroup
            extend PuppetTest::RunnableTest
        end
    end
end

module Test
    module Unit
        class TestCase
            extend PuppetTest::RunnableTest
        end
    end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-0.25.5 spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
puppet-0.25.4 spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
puppet-0.25.3 spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
puppet-0.25.2 spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
puppet-0.25.1 spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb
puppet-0.25.0 spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb