summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-07-06 17:56:56 -0700
committerMatt Wrock <matt@mattwrock.com>2016-07-06 17:56:56 -0700
commit1230d6b5795f61959418acd665a3e4e9d0d71411 (patch)
treee04330f58dc1aba4f628af17ee648a77e8592250
parenta1e923cae62ea09c41bec46adc0b81a46d1ce27e (diff)
downloadchef-1230d6b5795f61959418acd665a3e4e9d0d71411.tar.gz
chef-config tests should ride on locked gems
-rw-r--r--Gemfile2
-rw-r--r--chef-config/Gemfile5
-rw-r--r--tasks/rspec.rb2
3 files changed, 5 insertions, 4 deletions
diff --git a/Gemfile b/Gemfile
index f001cc117a..2b92a96b42 100644
--- a/Gemfile
+++ b/Gemfile
@@ -11,7 +11,7 @@ source "https://rubygems.org"
# of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed)
gem "chef", path: "."
-gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
+gem "chef-config", path: File.expand_path("../chef-config", __FILE__), group: :chef_config if File.exist?(File.expand_path("../chef-config", __FILE__))
# Ensure that we can always install rake, regardless of gem groups
gem "rake", group: [ :default, :omnibus_package, :development ]
gem "bundler"
diff --git a/chef-config/Gemfile b/chef-config/Gemfile
index 96ab544690..ead718f9e5 100644
--- a/chef-config/Gemfile
+++ b/chef-config/Gemfile
@@ -1,4 +1,5 @@
source "https://rubygems.org"
-# Specify your gem's dependencies in chef-config.gemspec
-gemspec
+require_relative "../tasks/gemfile_util"
+
+GemfileUtil.include_locked_gemfile(self, "../Gemfile", groups: [ :chef_config, :development ])
diff --git a/tasks/rspec.rb b/tasks/rspec.rb
index 616a68f09e..c6ac835576 100644
--- a/tasks/rspec.rb
+++ b/tasks/rspec.rb
@@ -29,7 +29,7 @@ begin
task :component_specs do
Dir.chdir("chef-config") do
Bundler.with_clean_env do
- sh("bundle install")
+ sh("bundle install --local")
sh("bundle exec rake spec")
end
end