Skip to content

Commit

Permalink
Merge pull request ManageIQ#15853 from NickLaMuro/spec-helper-cleanup
Browse files Browse the repository at this point in the history
spec/spec_helper.rb cleanup
  • Loading branch information
bdunne authored Aug 18, 2017
2 parents bcd4087 + c39aef6 commit 7444e38
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
require 'vcr'
require 'cgi'

# FIXME: This bypasses the lookup of Javascript dependencies in tests until they can be found and uncoupled
class << ActionController::Base.helpers
def image_path(path, options = {})
path
end
end

# Fail tests that try to include stuff in `main`
require_relative 'support/test_contamination'
Spec::Support::TestContamination.setup
Expand Down Expand Up @@ -57,23 +50,7 @@ def image_path(path, options = {})
config.example_status_persistence_file_path = Rails.root.join("tmp/rspec_example_store.txt")
end

config.include UiConstants, :type => :view

config.include UiConstants, :type => :controller
config.include Spec::Support::AuthHelper, :type => :controller
config.include Spec::Support::AuthHelper, :type => :helper

config.include Spec::Support::PresenterHelper, :type => :presenter
config.define_derived_metadata(:file_path => /spec\/presenters/) do |metadata|
metadata[:type] ||= :presenter
end

config.include Spec::Support::RakeTaskExampleGroup, :type => :rake_task
config.include Spec::Support::ButtonHelper, :type => :button
config.include Spec::Support::AuthHelper, :type => :button
config.define_derived_metadata(:file_path => /spec\/helpers\/application_helper\/buttons/) do |metadata|
metadata[:type] = :button
end

# config.before(:all) do
# EvmSpecHelper.log_ruby_object_usage
Expand All @@ -84,7 +61,6 @@ def image_path(path, options = {})

config.before(:each) do |example|
EmsRefresh.try(:debug_failures=, true)
ApplicationController.handle_exceptions = false if %w(controller requests).include?(example.metadata[:type])
end

config.around(:each) do |example|
Expand Down

0 comments on commit 7444e38

Please sign in to comment.