Skip to content

Commit

Permalink
Switch to solidus_support spec_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Feb 23, 2018
1 parent 969b91c commit 32bd3b6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 86 deletions.
19 changes: 11 additions & 8 deletions solidus_comments.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ Gem::Specification.new do |s|
s.requirements << 'none'

solidus_version = ['>= 1.0', '< 3']
s.add_runtime_dependency 'solidus_core', solidus_version
s.add_runtime_dependency 'solidus_backend', solidus_version
s.add_runtime_dependency 'solidus_api', solidus_version
s.add_runtime_dependency 'deface'
s.add_dependency 'solidus_core', solidus_version
s.add_dependency 'solidus_backend', solidus_version
s.add_dependency 'solidus_api', solidus_version
s.add_dependency 'deface'

s.add_dependency 'acts_as_commentable', '4.0.1'
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'sqlite3'

s.add_development_dependency 'capybara'
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'capybara-screenshot'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'factory_bot'
s.add_development_dependency 'ffaker'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'pry-rails'
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'sqlite3'
end
34 changes: 7 additions & 27 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
ENV["RAILS_ENV"] ||= "test"

require File.expand_path("../dummy/config/environment.rb", __FILE__)

begin
require File.expand_path('../dummy/config/environment', __FILE__)
rescue LoadError
fail 'Could not load dummy application. Please ensure you have run `bundle exec rake test_app`'
end

require "solidus_support/extension/feature_helper"

require 'rspec/rails'
require 'pry'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |file| require file }
Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each { |f| require f }

RSpec.configure do |config|
# == Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
#
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
config.mock_with :rspec

# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.infer_spec_type_from_file_location!
config.raise_errors_for_deprecations!

# because database cleaner
config.use_transactional_fixtures = false
config.example_status_persistence_file_path = "./spec/examples.txt"

config.include FeatureHelper, type: :feature
end
12 changes: 0 additions & 12 deletions spec/support/capybara.rb

This file was deleted.

24 changes: 0 additions & 24 deletions spec/support/database_cleaner.rb

This file was deleted.

8 changes: 0 additions & 8 deletions spec/support/factory_girl.rb

This file was deleted.

7 changes: 0 additions & 7 deletions spec/support/spree.rb

This file was deleted.

0 comments on commit 32bd3b6

Please sign in to comment.