Skip to content

Commit

Permalink
Using unless instead of if not
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Nov 16, 2011
1 parent 87ecd36 commit 9edb749
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testing/lib/refinery/tasks/testing.rake
@@ -1,4 +1,4 @@
namespace :refinery do
namespace :refinery do
namespace :testing do
desc "Generates a dummy app for testing"
task :dummy_app => [:setup_dummy_app, :migrate_dummy_app]
Expand All @@ -23,10 +23,10 @@ namespace :refinery do
end

task :migrate_dummy_app do
if !defined?(ENGINE_PATH) || !ENGINE_PATH
unless defined?(ENGINE_PATH) && ENGINE_PATH
abort("ERROR: ENGINE_PATH must be defined and contain a path pointing to your engine's root.")
end

engines = [
'refinery_core',
'refinery_settings',
Expand All @@ -41,10 +41,10 @@ namespace :refinery do

desc "Remove the dummy app used for testing"
task :clean_dummy_app do
if !defined?(ENGINE_PATH) || !ENGINE_PATH
unless defined?(ENGINE_PATH) && ENGINE_PATH
abort("ERROR: ENGINE_PATH must be defined and contain a path pointing to your engine's root.")
end

system "rm -Rdf #{File.join(ENGINE_PATH, 'spec/dummy')}"
end

Expand Down

0 comments on commit 9edb749

Please sign in to comment.