Sha256: e98e3e614256687de1b40dffe0be88c24291693600abf825efe40863b4055e24

Contents?: true

Size: 580 Bytes

Versions: 5

Compression:

Stored size: 580 Bytes

Contents

require 'spork'

module StripeI18n
  module Spec
    module FakeApp
      def self.run(*tests)
        forker = Spork::Forker.new do
          require 'stripe-i18n'
          require 'action_controller/railtie'

          app = Class.new(Rails::Application)
          app.config.active_support.deprecation = :log
          app.config.eager_load = false

          yield(app.config) if block_given?
          app.initialize!

          results = tests.map(&:call)
          results.size == 1 ? results.first : results
        end

        forker.result
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe-i18n-2.0.0 spec/support/fake_app.rb
stripe-i18n-1.3.0 spec/support/fake_app.rb
stripe-i18n-1.2.0 spec/support/fake_app.rb
stripe-i18n-1.1.0 spec/support/fake_app.rb
stripe-i18n-1.0.0 spec/support/fake_app.rb