summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2013-08-04 23:55:17 +0200
committerJosef Šimánek <josef.simanek@gmail.com>2013-08-05 00:03:28 +0200
commit61bce97dbf63841f1a71574ae3bbfb2c05a8632d (patch)
treef73e6690e5b978fd80f270ff37cd4b16bdbc0ce2
parentccbaa4249289c9d6e1f2651ce02e2396f6d71c6e (diff)
downloadbundler-61bce97dbf63841f1a71574ae3bbfb2c05a8632d.tar.gz
Fix specs for "Use man instead of groff".
-rw-r--r--spec/other/help_spec.rb12
-rw-r--r--spec/support/helpers.rb8
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/other/help_spec.rb b/spec/other/help_spec.rb
index 73203f227b..739f62224e 100644
--- a/spec/other/help_spec.rb
+++ b/spec/other/help_spec.rb
@@ -11,21 +11,21 @@ describe "bundle help" do
expect(err).to include("running `gem cleanup bundler`.")
end
- it "uses groff when available" do
- fake_groff!
+ it "uses mann when available" do
+ fake_man!
bundle "help gemfile"
- expect(out).to eq(%|["-Wall", "-mtty-char", "-mandoc", "-Tascii", "#{root}/lib/bundler/man/gemfile.5"]|)
+ expect(out).to eq(%|["#{root}/lib/bundler/man/gemfile.5"]|)
end
it "prefixes bundle commands with bundle- when finding the groff files" do
- fake_groff!
+ fake_man!
bundle "help install"
- expect(out).to eq(%|["-Wall", "-mtty-char", "-mandoc", "-Tascii", "#{root}/lib/bundler/man/bundle-install"]|)
+ expect(out).to eq(%|["#{root}/lib/bundler/man/bundle-install"]|)
end
- it "simply outputs the txt file when there is no groff on the path" do
+ it "simply outputs the txt file when there is no man on the path" do
kill_path!
bundle "help install", :expect_err => true
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 27654b7650..ec9cf27e60 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -222,13 +222,13 @@ module Spec
ENV["PATH"] = "#{tmp("broken_path")}:#{ENV["PATH"]}"
end
- def fake_groff!
- FileUtils.mkdir_p(tmp("fake_groff"))
- File.open(tmp("fake_groff/groff"), "w", 0755) do |f|
+ def fake_man!
+ FileUtils.mkdir_p(tmp("fake_man"))
+ File.open(tmp("fake_man/man"), "w", 0755) do |f|
f.puts "#!/usr/bin/env ruby\nputs ARGV.inspect\n"
end
- ENV["PATH"] = "#{tmp("fake_groff")}:#{ENV["PATH"]}"
+ ENV["PATH"] = "#{tmp("fake_man")}:#{ENV["PATH"]}"
end
def kill_path!