diff options
author | Jared Norman <jared@super.gd> | 2018-12-30 17:37:53 -0800 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2018-12-30 17:37:53 -0800 |
commit | 730206dc4ab3b8555918e6a87b468b7feeb45c8f (patch) | |
tree | 0441547c4d69c7c18c7d19854f8d6b109204e2af | |
parent | fa318e717492f4ba04372e93b2bcc41451b29cc7 (diff) |
Add task for generating dummy app used for testing
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Rakefile | 15 |
2 files changed, 15 insertions, 1 deletions
@@ -11,3 +11,4 @@ .rspec_status Gemfile.lock +/spec/dummy @@ -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 |