diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2017-12-17 11:36:55 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2017-12-17 11:38:07 +0100 |
commit | 9be44b3fa9985b8a93160434ce9f6dc922ec4387 (patch) | |
tree | cf488691c1168caf9e02be7830635da76b3bc57b /vendor/extensions/gallery_links/spec/spec_helper.rb | |
parent | 302aadd8bfd4030d9b2a71d5121fd650c0918338 (diff) | |
download | hmnoweb-9be44b3fa9985b8a93160434ce9f6dc922ec4387.tar.gz hmnoweb-9be44b3fa9985b8a93160434ce9f6dc922ec4387.tar.bz2 hmnoweb-9be44b3fa9985b8a93160434ce9f6dc922ec4387.zip |
New extension GalleryLinks
Diffstat (limited to 'vendor/extensions/gallery_links/spec/spec_helper.rb')
-rw-r--r-- | vendor/extensions/gallery_links/spec/spec_helper.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/extensions/gallery_links/spec/spec_helper.rb b/vendor/extensions/gallery_links/spec/spec_helper.rb new file mode 100644 index 0000000..d3214e2 --- /dev/null +++ b/vendor/extensions/gallery_links/spec/spec_helper.rb @@ -0,0 +1,31 @@ +# Configure Rails Environment +ENV["RAILS_ENV"] ||= 'test' + +if File.exist?(dummy_path = File.expand_path('../dummy/config/environment.rb', __FILE__)) + require dummy_path +elsif File.dirname(__FILE__) =~ %r{vendor/extensions} + # Require the path to the refinerycms application this is vendored inside. + require File.expand_path('../../../../../config/environment', __FILE__) +else + puts "Could not find a config/environment.rb file to require. Please specify this in #{File.expand_path(__FILE__)}" +end + +require 'rspec/rails' +require 'capybara/rspec' + +Rails.backtrace_cleaner.remove_silencers! + +RSpec.configure do |config| + config.mock_with :rspec + config.treat_symbols_as_metadata_keys_with_true_values = true + config.filter_run :focus => true + config.run_all_when_everything_filtered = true +end + +# Requires supporting files with custom matchers and macros, etc, +# in ./support/ and its subdirectories including factories. +([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p| + Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s] +}.flatten.sort.each do |support_file| + require support_file +end |