summaryrefslogtreecommitdiff
path: root/spec/mixlib/spec_helper.rb
blob: 731617c71567a28ead7e076b2321e73a110eeb9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$:.unshift File.expand_path("../../../lib", __FILE__)
require 'mixlib/shellout'
require 'ap'

def windows?
  if RUBY_PLATFORM =~ /mswin|mingw|windows/
    true
  else
    false
  end
end

if RUBY_PLATFORM =~ /mswin|mingw|windows/
  LINE_ENDING = "\r\n"
  ECHO_LC_ALL = "echo %LC_ALL%"
else
  LINE_ENDING = "\n"
  ECHO_LC_ALL = "echo $LC_ALL"
end

RSpec.configure do |config|
  config.mock_with :rspec
  config.filter_run :focus => true
  config.filter_run_excluding :external => true
  config.run_all_when_everything_filtered = true
end