From f67c6a1f3186acfcf99219c72f4aade8e286824e Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Wed, 12 Mar 2014 22:15:58 -0300 Subject: [PATCH] Minor tweaks to accomodate acceptance specs --- Gemfile | 11 +++++------ Gemfile.lock | 2 +- vagrant-spec.config.rb | 14 ++++++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 781e97c..1058f71 100644 --- a/Gemfile +++ b/Gemfile @@ -17,15 +17,14 @@ group :development, :test do gem 'rake' # TODO: Update https://github.com/fgrehm/vagrant-lxc/issues/111 gem 'rspec', '2.99.0.beta2' - gem 'coveralls', require: false + gem 'coveralls', require: (ENV['COVERAGE'] == 'true') gem 'vagrant-spec', git: 'https://github.com/mitchellh/vagrant-spec.git' end group :plugins do gem 'vagrant-lxc', path: '.' - if ENV['ACCEPTANCE'] != 'true' - gem 'vagrant-cachier', git: 'https://github.com/fgrehm/vagrant-cachier.git' - gem 'vagrant-pristine', git: 'https://github.com/fgrehm/vagrant-pristine.git' - gem 'vagrant-omnibus' - end + acceptance = (ENV['ACCEPTANCE'] == 'true') + gem 'vagrant-cachier', git: 'https://github.com/fgrehm/vagrant-cachier.git', require: !acceptance + gem 'vagrant-pristine', git: 'https://github.com/fgrehm/vagrant-pristine.git', require: !acceptance + gem 'vagrant-omnibus', require: !acceptance end diff --git a/Gemfile.lock b/Gemfile.lock index 53895ca..9d540ef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -113,7 +113,7 @@ GEM thor (0.18.1) timers (1.1.0) tins (1.0.0) - vagrant-omnibus (1.3.0) + vagrant-omnibus (1.3.1) wdm (0.1.0) PLATFORMS diff --git a/vagrant-spec.config.rb b/vagrant-spec.config.rb index c584211..dbb4f05 100644 --- a/vagrant-spec.config.rb +++ b/vagrant-spec.config.rb @@ -3,6 +3,15 @@ unless ENV['USER'] == 'vagrant' exit 1 end +# FIXME: Figure out why this doesn't work +if ENV['COVERAGE'] == 'true' + require 'simplecov' + require 'coveralls' + + SimpleCov.start { add_filter '/spec/' } + SimpleCov.command_name 'acceptance' +end + # if defined? SimpleCov # SimpleCov.command_name 'acceptance' # end @@ -20,8 +29,5 @@ end Vagrant::Spec::Acceptance.configure do |c| c.component_paths << "spec/acceptance" - - c.provider 'lxc', - box: ENV['BOX_PATH'], - features: ['!suspend'] + c.provider 'lxc', box: ENV['BOX_PATH'], features: ['!suspend'] end