Sha256: 7ca2a578aa56ee96c8f732f6e87b8b4d32f5a7497940c0cbfc4f3ad645cb008f

Contents?: true

Size: 1.57 KB

Versions: 14

Compression:

Stored size: 1.57 KB

Contents

require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'mocha'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'jumpstart'

class Test::Unit::TestCase

  def reset_global_defaults
    JumpStart.module_eval do
      @jumpstart_setup_yaml = YAML.load_file("#{JumpStart::CONFIG_PATH}/jumpstart_setup.yml")
      @jumpstart_version_yaml = YAML.load_file("#{JumpStart::CONFIG_PATH}/jumpstart_version.yml")
      @templates_path = nil
    end
  end

end

module JumpStart

  class Base

    # Added monkeypatch for exit methods back until I find a more elegant way to stop generated jumpstarts (jumpstarts that are started programatically during testing) from actually running the exit method.
    # Tests that use this patch:
    # new_project_from_template_options tests. Starting around line 478 of test_base.rb
    def exit_with_success
      puts "\n\n  Exiting JumpStart...".purple
      puts "\n  Success! ".green + @project_name.green_bold + " has been created at: ".green + FileUtils.join_paths(@install_path, @project_name).green_bold + "\n\n".green
      puts "******************************************************************************************************************************************\n"
      project = nil
    end

    def exit_normal
      puts "\n\n  Exiting JumpStart...".purple
      puts "\n  Goodbye!\n\n"
      puts "******************************************************************************************************************************************\n"
      project = nil
    end

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jumpstart-0.6.5 test/helper.rb
jumpstart-0.6.4 test/helper.rb
jumpstart-0.6.3 test/helper.rb
jumpstart-0.6.2 test/helper.rb
jumpstart-0.6.1 test/helper.rb
jumpstart-0.6.0 test/helper.rb
jumpstart-0.5.4 test/helper.rb
jumpstart-0.5.3 test/helper.rb
jumpstart-0.5.2 test/helper.rb
jumpstart-0.5.1 test/helper.rb
jumpstart-0.5.0 test/helper.rb
jumpstart-0.4.0 test/helper.rb
jumpstart-0.3.9 test/helper.rb
jumpstart-0.3.8 test/helper.rb