Sha256: a5b4e3472739d1f948609ae63e1cd8ae178eb38794bb04a0e6c82170388f9837

Contents?: true

Size: 698 Bytes

Versions: 4

Compression:

Stored size: 698 Bytes

Contents

module Neo
  module Rails
    module Presenter
      module TestHelper
        def setup
          Presenter.view_context = FakeViewContext.instance
        end
        module_function :setup

        class FakeViewContext
          include Singleton
          include ActionView::Helpers::TagHelper
          include ActionView::Helpers::UrlHelper
          include ActionView::Helpers::TranslationHelper
          include ActionView::Helpers::NumberHelper
          include Sprockets::Helpers::RailsHelper
          include Sprockets::Helpers::IsolatedHelper
          include ::Rails.application.routes.url_helpers

          attr_accessor :output_buffer
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
neo-rails-0.1.0 lib/neo/rails/presenter/test_helper.rb
neo-rails-0.0.8 lib/neo/rails/presenter/test_helper.rb
neo-rails-0.0.7 lib/neo/rails/presenter/test_helper.rb
neo-rails-0.0.6 lib/neo/rails/presenter/test_helper.rb