Skip to content

Commit 2e43d78

Browse files
author
Alex Evanczuk
authored
Use packs/rspec/support to simplify testing (#29)
* bump packs * Use packs/rspec/support
1 parent ed56424 commit 2e43d78

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GEM
1515
coderay (1.1.3)
1616
diff-lcs (1.4.4)
1717
method_source (1.0.0)
18-
packs (0.0.2)
18+
packs (0.0.5)
1919
sorbet-runtime
2020
parser (3.1.2.0)
2121
ast (~> 2.4.1)

spec/spec_helper.rb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'pry'
33
require 'code_ownership'
44
require 'code_teams'
5-
5+
require 'packs/rspec/support'
66
require_relative 'support/application_fixtures'
77

88
RSpec.configure do |config|
@@ -16,28 +16,11 @@
1616
c.syntax = :expect
1717
end
1818

19-
config.around do |example|
20-
prefix = [File.basename($0), Process.pid].join('-') # rubocop:disable Style/SpecialGlobalVars
21-
tmpdir = Dir.mktmpdir(prefix)
22-
Dir.chdir(tmpdir) do
23-
example.run
24-
end
25-
ensure
26-
FileUtils.rm_rf(tmpdir)
27-
end
28-
2919
config.include_context 'application fixtures'
3020

3121
config.before do
3222
CodeOwnership.bust_caches!
3323
CodeTeams.bust_caches!
34-
Packs.bust_cache!
3524
allow(CodeTeams::Plugin).to receive(:registry).and_return({})
3625
end
3726
end
38-
39-
def write_file(path, content = '')
40-
pathname = Pathname.new(path)
41-
FileUtils.mkdir_p(pathname.dirname)
42-
pathname.write(content)
43-
end

0 commit comments

Comments
 (0)