Sha256: be1930101cfe857bde941fe36241155c3b2961429493a50a76fe2fd4505573fc

Contents?: true

Size: 1.53 KB

Versions: 34

Compression:

Stored size: 1.53 KB

Contents

require "high_five"
require 'high_five/thor/runner'
require 'high_five/thor/tasks'
# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'
end

RSpec::Matchers.define :exist do
  match do |actual|
    File.exists?(actual)
  end
end

module HighFive::TestHelper
  def create_dummy_app!
    @original_dir = Dir.pwd
    @project_root = Dir.mktmpdir("hi5")
    Dir.chdir @project_root
    FileUtils.cp_r(Dir[File.join(File.dirname(__FILE__), "dummy", "*")], @project_root)
  end

  def cli(task_class, options={environment: 'development'})
    cli = task_class.new([], options)
    cli.instance_variable_set("@base_config", HighFive::Config.instance)
    cli
  end

  def destroy_dummy_app!
    puts "Cleaning up deploy directory.  Contents: "
    system("find #{@project_root} -print | sed 's;[^/]*/;|___;g;s;___|; |;g'")
    Dir.chdir @original_dir
    FileUtils.rm_rf @project_root
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
high_five-0.3.23 spec/spec_helper.rb
high_five-0.3.22 spec/spec_helper.rb
high_five-0.3.21 spec/spec_helper.rb
high_five-0.3.20 spec/spec_helper.rb
high_five-0.3.19 spec/spec_helper.rb
high_five-0.3.18 spec/spec_helper.rb
high_five-0.3.17 spec/spec_helper.rb
high_five-0.3.16 spec/spec_helper.rb
high_five-0.3.15 spec/spec_helper.rb
high_five-0.3.14 spec/spec_helper.rb
high_five-0.3.13 spec/spec_helper.rb
high_five-0.3.12 spec/spec_helper.rb
high_five-0.3.11 spec/spec_helper.rb
high_five-0.3.10 spec/spec_helper.rb
high_five-0.3.9 spec/spec_helper.rb
high_five-0.3.8 spec/spec_helper.rb
high_five-0.3.7 spec/spec_helper.rb
high_five-0.3.6 spec/spec_helper.rb
high_five-0.3.5 spec/spec_helper.rb
high_five-0.3.4 spec/spec_helper.rb