features/support/env.rb in stove-1.1.2 vs features/support/env.rb in stove-2.0.0.beta.1
- old
+ new
@@ -1,41 +1,25 @@
+require 'bundler/setup'
+
require 'aruba/api'
require 'aruba/cucumber'
-require 'aruba/in_process'
+require 'cucumber/rspec/doubles'
require 'rspec/expectations'
+
+require 'community_zero/rspec'
+CommunityZero::RSpec.start
+Before { CommunityZero::RSpec.reset! }
+
require 'stove'
-require_relative '../../spec/support/community_site'
-require_relative '../../spec/support/git'
+require File.expand_path('../stove/git', __FILE__)
World(Aruba::Api)
-World(Stove::RSpec::Git)
+World(Stove::Git)
-Stove.set_formatter(:silent)
-Stove::Config.instance_variable_set(:@instance, {
- 'jira_username' => 'default',
- 'jira_password' => 'default',
- 'github_usernmae' => 'default',
- 'github_password' => 'default',
- 'opscode_username' => 'stove',
- 'opscode_pem_file' => File.expand_path(File.join(__FILE__, '..', 'stove.pem')),
-})
-Stove::RSpec::CommunitySite.start(port: 3390)
-Stove::CommunitySite.base_uri(Stove::RSpec::CommunitySite.server_url)
-Stove::CommunitySite.http_uri(Stove::RSpec::CommunitySite.server_url)
-
Before do
- @dirs = [Dir.mktmpdir]
- Stove::RSpec::CommunitySite.reset!
-end
-
-Before('~@spawn') do
- Aruba::InProcess.main_class = Stove::Cli
- Aruba.process = Aruba::InProcess
-end
-
-Before('@spawn') do
- Aruba.process = Aruba::SpawnProcess
+ FileUtils.rm_rf(tmp_path)
+ @aruba_timeout_seconds = 15
end
# The path to Aruba's "stuff"
def tmp_path
File.expand_path(@dirs.first.to_s)