features/support/env.rb in berkshelf-0.3.7 vs features/support/env.rb in berkshelf-0.4.0.rc1
- old
+ new
@@ -10,34 +10,26 @@
APP_ROOT = File.expand_path('../../../', __FILE__)
ENV["BERKSHELF_PATH"] = File.join(APP_ROOT, "tmp", "berkshelf")
- begin
- CONFIG = YAML.load(File.read(File.join(APP_ROOT, "features", "config.yml")))
- rescue Errno::ENOENT
- raise "Please create a config file at features/config.yml from the sample found at features/config.sample.yml"
- end
-
Dir[File.join(APP_ROOT, "spec/support/**/*.rb")].each {|f| require f}
Around do |scenario, block|
VCR.use_cassette(scenario.title) do
block.call
end
end
Before do
- Chef::Config[:chef_server_url] = CONFIG['chef_server_url']
- Chef::Config[:client_key] = CONFIG['client_key']
- Chef::Config[:node_name] = CONFIG['node_name']
clean_cookbook_store
@aruba_io_wait_seconds = 5
+ @aruba_timeout_seconds = 8
end
Before('@slow_process') do
- @aruba_timeout_seconds = 15
+ @aruba_timeout_seconds = 60
@aruba_io_wait_seconds = 10
end
def cookbook_store
Pathname.new(ENV["BERKSHELF_PATH"])
@@ -50,13 +42,19 @@
def app_root_path
Pathname.new(APP_ROOT)
end
+ def tmp_path
+ app_root_path.join('spec/tmp')
+ end
+
def fixtures_path
app_root_path.join('spec/fixtures')
end
end
Spork.each_run do
+ Berkshelf::RSpec::Knife.load_knife_config(File.join(APP_ROOT, 'spec/knife.rb'))
+
require 'berkshelf'
end