Sha256: 791ed2829897cbd88d91238b3aab96a923d74a9e1f3c732a4b48ff9ba37aca30

Contents?: true

Size: 1008 Bytes

Versions: 15

Compression:

Stored size: 1008 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)) + "/../config/test_environment"
require 'test_helper'
require 'constructor'
require 'hardmock'


class Test::Unit::TestCase
  extend Behaviors
  
  def rake_setup(rake_wrapper_file, *mocks_list)
    # create mocks rules will use
    objects = create_mocks(*mocks_list)
    # create & assign instance of rake
    @rake = Rake::Application.new
    Rake.application = @rake
    
    # tell rake to be verbose in its tracing output
    # (hard to do otherwise since our tests are run from within a rake instance around this one)
    Rake.application.options.trace_rules = true

    # load rakefile wrapper that loads actual rules
    load File.join(TESTS_ROOT, rake_wrapper_file)
    
    # provide the mock objects to the rakefile instance under test
    @rake['inject'].invoke(objects)        
  end
  
  def redefine_global_constant(constant, value)
    $config_options[constant.downcase.to_sym].replace(value)
  end
  
end


Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ceedling-0.19.0 test_graveyard/integration_test_helper.rb
ceedling-0.18.0 test_graveyard/integration_test_helper.rb
ceedling-0.17.0 test_graveyard/integration_test_helper.rb
ceedling-0.16.0 test_graveyard/integration_test_helper.rb
ceedling-0.15.6 test_graveyard/integration_test_helper.rb
ceedling-0.15.5 test_graveyard/integration_test_helper.rb
ceedling-0.15.4 test_graveyard/integration_test_helper.rb
ceedling-0.15.3 test_graveyard/integration_test_helper.rb
ceedling-0.15.2 test_graveyard/integration_test_helper.rb
ceedling-0.15.1 test_graveyard/integration_test_helper.rb
ceedling-0.15.0 test_graveyard/integration_test_helper.rb
ceedling-0.13.0 test_graveyard/integration_test_helper.rb
ceedling-0.13.0.rc1 test_graveyard/integration_test_helper.rb
ceedling-0.0.2 new_project_template/vendor/ceedling/test/integration_test_helper.rb
ceedling-0.0.1 new_project_template/vendor/ceedling/test/integration_test_helper.rb