summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2018-12-30 17:37:53 -0800
committerJared Norman <jared@super.gd>2018-12-30 17:37:53 -0800
commit730206dc4ab3b8555918e6a87b468b7feeb45c8f (patch)
tree0441547c4d69c7c18c7d19854f8d6b109204e2af
parentfa318e717492f4ba04372e93b2bcc41451b29cc7 (diff)
Add task for generating dummy app used for testing
-rw-r--r--.gitignore1
-rw-r--r--Rakefile15
2 files changed, 15 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5c249f1..94ec22c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
.rspec_status
Gemfile.lock
+/spec/dummy
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