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