Skip to content

Commit

Permalink
Fixes #15042 - Use a single fixture dir (Katello#6309)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill authored Sep 13, 2016
1 parent e64e6d8 commit f371390
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ bundler.d/local*.rb
config/initializers/_local*.rb
config/initializers/local*.rb
lib/tasks/local*.rb
test/fixtures/all_fixtures
doc/graphs/*.svg
.ruby-version
.ruby-gemset
Expand Down
4 changes: 3 additions & 1 deletion test/katello_test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ module FixtureTestCase

Katello::FixturesSupport.set_fixture_classes(self)

self.fixture_path = Dir.mktmpdir("katello_fixtures")
self.fixture_path = "#{Katello::Engine.root}/test/fixtures/all_fixtures/"
FileUtils.rm_rf(self.fixture_path) if File.directory?(self.fixture_path)
Dir.mkdir(self.fixture_path)
FileUtils.cp(Dir.glob("#{Katello::Engine.root}/test/fixtures/models/*"), self.fixture_path)
FileUtils.cp(Dir.glob("#{Rails.root}/test/fixtures/*"), self.fixture_path)
fixtures(:all)
Expand Down

0 comments on commit f371390

Please sign in to comment.