summaryrefslogtreecommitdiff
path: root/spec/other
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-08-23 13:54:59 -0700
committerCarl Lerche <carllerche@mac.com>2010-08-23 14:13:36 -0700
commit67e33109bd9d82dd770ffa65e207ed17ed425dd1 (patch)
tree5c82d3fa3d81cac6a6620c7be8d56f6ecc6dacc3 /spec/other
parent1012be895c22241d65bf9f378a886b8c38a674f7 (diff)
downloadbundler-67e33109bd9d82dd770ffa65e207ed17ed425dd1.tar.gz
Integrate the new bundler man pages with bundle help
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/help_spec.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/spec/other/help_spec.rb b/spec/other/help_spec.rb
index 8c71d09ff2..79279f8aa2 100644
--- a/spec/other/help_spec.rb
+++ b/spec/other/help_spec.rb
@@ -7,4 +7,30 @@ describe "bundle help" do
bundle "help", :expect_err => true
err.should == "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`."
end
-end \ No newline at end of file
+
+ it "uses groff when available" do
+ fake_groff!
+
+ bundle "help gemfile"
+ out.should == %|["-Wall", "-mtty-char", "-mandoc", "-Tascii", "#{root}/lib/bundler/man/gemfile.5"]|
+ end
+
+ it "prefixes bundle commands with bundle- when finding the groff files" do
+ fake_groff!
+
+ bundle "help install"
+ out.should == %|["-Wall", "-mtty-char", "-mandoc", "-Tascii", "#{root}/lib/bundler/man/bundle-install"]|
+ end
+
+ it "simply outputs the txt file when there is no groff on the path" do
+ kill_path!
+
+ bundle "help install"
+ out.should =~ /BUNDLE-INSTALL/
+ end
+
+ it "still outputs the old help for commands that do not have man pages yet" do
+ bundle "help check"
+ out.should include("Check searches the local machine")
+ end
+end