Sha256: 551c8d5f071da6e0aae3a982799065d21983e7612dd07706248481ba8090951c

Contents?: true

Size: 803 Bytes

Versions: 6

Compression:

Stored size: 803 Bytes

Contents

$: << File.expand_path('../../lib', __FILE__)
$: << File.expand_path('../fixtures', __FILE__)
require 'new'

# 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
  config.order = :random

  config.before do
    New.stub(:say)
    stub_const 'New::DEFAULT_DIR', root('spec', 'fixtures')
    stub_const 'New::CUSTOM_DIR', root('spec', 'fixtures', 'custom')
  end

  config.before :each do
    # Force specs to always lookup new templates and tasks
    New.instance_variables.each{ |v| New.instance_variable_set(v, nil) }
  end
end

def root *paths
  paths.unshift(File.expand_path('../../', __FILE__)).compact.join '/'
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
new-0.0.6 spec/spec_helper.rb
new-0.0.5 spec/spec_helper.rb
new-0.0.4 spec/spec_helper.rb
new-0.0.3 spec/spec_helper.rb
new-0.0.2 spec/spec_helper.rb
new-0.0.0 spec/spec_helper.rb