Sha256: 2cbe3e2fedab99371c3d78fd1d4612968a9e6821812670d29e653cf366707ba1

Contents?: true

Size: 811 Bytes

Versions: 4

Compression:

Stored size: 811 Bytes

Contents

# Why isn't this already required in omnibus?
require 'rake/dsl_definition'

require 'omnibus'
require 'fauxhai'

module Omnibus
  module RSpec
    SPEC_DATA = File.expand_path(File.join(File.dirname(__FILE__), 'data'))

    def software_path(name)
      File.join(SPEC_DATA, 'software', "#{name}.rb")
    end

    def overrides_path(name)
      File.join(SPEC_DATA, 'overrides', "#{name}.overrides")
    end

    def project_path(name)
      File.join(SPEC_DATA, 'projects', "#{name}.rb")
    end
  end
end

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

  # Force the expect syntax
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omnibus-2.0.2 spec/spec_helper.rb
omnibus-2.0.1 spec/spec_helper.rb
omnibus-2.0.0 spec/spec_helper.rb
omnibus-2.0.0.rc1 spec/spec_helper.rb