Skip to content

Commit d9088f5

Browse files
authored
[#37] Flaky test because of running order of tests (#38)
fixes #37
1 parent 13830c7 commit d9088f5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

spec/manpages/install_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
require "fileutils"
22

33
describe Manpages::Install do
4+
after do
5+
FileUtils.rm_r "spec/tmp"
6+
end
7+
48
it "copies the man pages to a correct directory structure" do
59
Manpages::Install.new(
610
Gem::Specification.new(name: "manpages_test"),
@@ -73,6 +77,5 @@
7377
"Problems creating symlink spec/tmp/man/man2/example.2\n" \
7478
"Problems creating symlink spec/tmp/man/man1/extra.1\n"
7579
).to_stdout
76-
FileUtils.rm_r "spec/tmp"
7780
end
7881
end

spec/manpages/uninstall_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
FileUtils.mkdir_p("spec/tmp/man/man1")
66
end
77

8+
after do
9+
FileUtils.rm_r "spec/tmp"
10+
end
11+
812
it "Deletes a manpage if the link is to this gem" do
913
FileUtils.ln_s("spec/data/man/example.1", "spec/tmp/man/man1/example.1")
1014
Manpages::Uninstall.new(

0 commit comments

Comments
 (0)