Sha256: 7b6ba351ddabb6ecdb99d2b3ce64590e89c6ad5962d5f87c596c7fb19912a6eb

Contents?: true

Size: 719 Bytes

Versions: 9

Compression:

Stored size: 719 Bytes

Contents

# frozen_string_literal: true

require 'eac_rails_gem_support/rspec/minitest_support'
require 'eac_ruby_utils/core_ext'

module EacRailsGemSupport
  module Rspec
    module Setup
      extend ::ActiveSupport::Concern
      require_sub __FILE__, include_modules: true

      def self.extended(obj)
        obj.setup_minitest_support
        obj.singleton_class.include(::EacRubyUtils::SimpleCache)
        obj.setup_rails_env
        return unless obj.setup_rails_app

        %w[fixtures capybara factory_bot].each do |item|
          obj.send("setup_#{item}")
        end
      end

      def setup_minitest_support
        rspec_config.include ::EacRailsGemSupport::Rspec::MinitestSupport
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
eac_rails_gem_support-0.9.2 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.9.1 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.9.0 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.8.0 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.7.2 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.7.1 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.7.0 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.6.0 lib/eac_rails_gem_support/rspec/setup.rb
eac_rails_gem_support-0.5.0 lib/eac_rails_gem_support/rspec/setup.rb