Skip to content

Commit

Permalink
[#37] Flaky test because of running order of tests (#38)
Browse files Browse the repository at this point in the history
fixes #37
  • Loading branch information
bitboxer authored Dec 4, 2016
1 parent 13830c7 commit d9088f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/manpages/install_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require "fileutils"

describe Manpages::Install do
after do
FileUtils.rm_r "spec/tmp"
end

it "copies the man pages to a correct directory structure" do
Manpages::Install.new(
Gem::Specification.new(name: "manpages_test"),
Expand Down Expand Up @@ -73,6 +77,5 @@
"Problems creating symlink spec/tmp/man/man2/example.2\n" \
"Problems creating symlink spec/tmp/man/man1/extra.1\n"
).to_stdout
FileUtils.rm_r "spec/tmp"
end
end
4 changes: 4 additions & 0 deletions spec/manpages/uninstall_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
FileUtils.mkdir_p("spec/tmp/man/man1")
end

after do
FileUtils.rm_r "spec/tmp"
end

it "Deletes a manpage if the link is to this gem" do
FileUtils.ln_s("spec/data/man/example.1", "spec/tmp/man/man1/example.1")
Manpages::Uninstall.new(
Expand Down

0 comments on commit d9088f5

Please sign in to comment.