Sha256: 910c146272dc3f5041fab0d27e1666b81305b953a0bb3dfe6f76761aee977c90

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

# 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
require "chef_fixie/config"

def load_from_config_example
  # load from config file
  config_file = "fixie.conf.example"
  Kernel.load(config_file)
end

def load_from_opscode
  ChefFixie::Config.instance.load_from_pc
end

RSpec.configure do |config|
  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"

  # configure specs

  load_from_opscode
  ChefFixie::Config.instance.merge_opts({})
  puts ChefFixie::Config.instance.to_text

  # Horrible shameful hack TODO FIXME
  # We can't include a lot of the SQL code until we configure things, because
  # we inherit from Model e.g.
  # class Users < Sequel::Model(:users)
  require "chef_fixie"
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
chef_fixie-1.0.8 spec/spec_helper.rb
chef_fixie-1.0.7 spec/spec_helper.rb
chef_fixie-1.0.3 spec/spec_helper.rb
chef_fixie-1.0.2 spec/spec_helper.rb
chef_fixie_shahid-0.5.2 spec/spec_helper.rb
chef_fixie-0.5.1 spec/spec_helper.rb
chef_fixie-0.5.0 spec/spec_helper.rb