Sha256: 38a972adec84838bacabcab7769ac38c285ab071e5d51b35fe6528ba01d704b9

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 Bytes

Contents

# frozen_string_literal: true

ENV["RAILS_ENV"] ||= "test"

require "minitest/mock"
require "rails"
require "action_controller"
require "pry"
require_relative "../lib/stimulus_reflex"

class TestApp < Rails::Application
  routes.draw { root to: "test#index" }
end

class ApplicationController < ActionController::Base; end

class TestController < ApplicationController
  include Rails.application.routes.url_helpers

  def index
    head :ok
  end
end

class SessionMock
  def load!
    nil
  end
end

class ActionDispatch::Request
  def session
    @session ||= SessionMock.new
  end
end

StimulusReflex.configuration.parent_channel = "ActionCable::Channel::Base"
ActionCable::Server::Base.config.cable = {adapter: "test"}
ActionCable::Server::Base.config.logger = Logger.new(nil)

require_relative "../app/channels/stimulus_reflex/channel"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stimulus_reflex-3.4.0.pre8 test/test_helper.rb
stimulus_reflex-3.4.0.pre7 test/test_helper.rb
stimulus_reflex-3.4.0.pre6 test/test_helper.rb