summaryrefslogtreecommitdiff
path: root/spec/functional/version_spec.rb
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-10-21 10:44:43 -0700
committersersut <serdar@opscode.com>2013-10-21 16:14:44 -0700
commitab49a996da6735b45b0790a5dc148e3b544d5a95 (patch)
tree9221cb083083d701d4727819d3e7d58162ec732b /spec/functional/version_spec.rb
parenta17565675e992f62404da051ce5136b0c02999b4 (diff)
downloadchef-ab49a996da6735b45b0790a5dc148e3b544d5a95.tar.gz
Make sure the bundle command is executed from the correct dir. Use bundle exec while launching chef-solo in functional tests as well.
Diffstat (limited to 'spec/functional/version_spec.rb')
-rw-r--r--spec/functional/version_spec.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/functional/version_spec.rb b/spec/functional/version_spec.rb
index 7c2b15c060..a7e99d48e3 100644
--- a/spec/functional/version_spec.rb
+++ b/spec/functional/version_spec.rb
@@ -22,20 +22,14 @@ require 'ohai/version'
describe "Chef Versions" do
include Chef::Mixin::ShellOut
+ let(:chef_dir) { File.join(File.dirname(__FILE__), "..", "..") }
- it "chef-client version should be sane" do
- shell_out("bundle exec chef-client -v").stdout.chomp.should == "Chef: #{Chef::VERSION}"
- end
-
- it "chef-shell version should be sane" do
- shell_out("bundle exec chef-shell -v").stdout.chomp.should == "Chef: #{Chef::VERSION}"
- end
+ binaries = [ "chef-client", "chef-shell", "chef-apply", "knife", "chef-solo" ]
- it "knife version should be sane" do
- shell_out("bundle exec knife -v").stdout.chomp.should == "Chef: #{Chef::VERSION}"
+ binaries.each do |binary|
+ it "#{binary} version should be sane" do
+ shell_out!("bundle exec #{binary} -v", :cwd => chef_dir).stdout.chomp.should == "Chef: #{Chef::VERSION}"
+ end
end
- it "ohai version should be sane" do
- shell_out("bundle exec ohai -v").stdout.chomp.should == "Ohai: #{Ohai::VERSION}"
- end
end