Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.

Commit

Permalink
in test:setup_plugin_fixtures, only copy engine plugin fixtures
Browse files Browse the repository at this point in the history
Signed-off-by: James Adam <james@lazyatom.com>
  • Loading branch information
whatcould authored and lazyatom committed Feb 11, 2009
1 parent a8c6d6d commit d74845a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/engines/testing.rb
Expand Up @@ -67,10 +67,14 @@ module Engines::Testing
# This method is called by the engines-supplied plugin testing rake tasks
def self.setup_plugin_fixtures(plugins = Engines.plugins.by_precedence)

# First, clear the directory
Dir.glob("#{self.temporary_fixtures_directory}/*.yml").each{|fixture| File.unlink(fixture)}

# Copy all plugin fixtures, and then the application fixtures, into this directory
plugins.each do |plugin|
plugin_fixtures_directory = File.join(plugin.directory, "test", "fixtures")
if File.directory?(plugin_fixtures_directory)
plugin_app_directory = File.join(plugin.directory, "app")
if File.directory?(plugin_app_directory) && File.directory?(plugin_fixtures_directory)
Engines.mirror_files_from(plugin_fixtures_directory, self.temporary_fixtures_directory)
end
end
Expand Down

0 comments on commit d74845a

Please sign in to comment.