summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-01-08 16:28:30 -0800
committerJared Norman <jared@super.gd>2019-01-08 16:28:30 -0800
commit8f972451158f8ce6e743c3c3a5b7a187db23dcef (patch)
treed7bc1fd47a9a4936f9d5fe121c62c797fa483864 /spec
parent1b5a31eb13bc4c2961ee4308118c78d1e041d17c (diff)
Setup up environment better
Just load the dummy app environment instead of explicitly requiring things.
Diffstat (limited to 'spec')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 35523ab..7a7f305 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,8 +1,13 @@
+ENV['RAILS_ENV'] ||= 'test'
+
require "bundler/setup"
-require "super_good/solidus_taxjar"
-# Load the dummy app:
-require File.expand_path('../dummy/config/environment.rb', __FILE__)
+begin
+ require File.expand_path('../dummy/config/environment', __FILE__)
+rescue LoadError
+ puts 'Could not load dummy application. Please ensure you have run `bundle exec rake test_app`'
+ exit
+end
RSpec.configure do |config|
config.expect_with :rspec do |c|