Sha256: 63abff1d64289e8f7099b352a7bc0b4c0a41a3b6e526331a49010654637dc5eb
Contents?: true
Size: 741 Bytes
Versions: 21
Compression:
Stored size: 741 Bytes
Contents
require "action_dispatch" require "capybara/rails" require "capybara/dsl" module ActiveAdminRequestHelpers extend ActiveSupport::Concern include ActionDispatch::Integration::Runner include RSpec::Rails::TestUnitAssertionAdapter include ActionDispatch::Assertions include Capybara::DSL include RSpec::Matchers def app ::Rails.application end def last_response page end included do before do @router = ::Rails.application.routes end end def with_temp_application(application) original_application = ActiveAdmin.application ActiveAdmin.application = application load_defaults! reload_routes! yield ensure ActiveAdmin.application = original_application end end
Version data entries
21 entries across 21 versions & 4 rubygems