summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index b7e9ed5..560b892 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,19 @@
require "bundler/gem_tasks"
require "rspec/core/rake_task"
+require 'spree/testing_support/extension_rake'
RSpec::Core::RakeTask.new(:spec)
-task :default => :spec
+task :default do
+ if Dir["spec/dummy"].empty?
+ Rake::Task[:test_app].invoke
+ Dir.chdir("../../")
+ end
+ Rake::Task[:spec].invoke
+end
+
+desc 'Generates a dummy app for testing'
+task :test_app do
+ ENV['LIB_NAME'] = 'super_good/solidus_taxjar'
+ Rake::Task['extension:test_app'].invoke
+end