test/test_helper.rb in stimulus_reflex-3.4.0.pre8 vs test/test_helper.rb in stimulus_reflex-3.4.0.pre9
- old
+ new
@@ -2,10 +2,11 @@
ENV["RAILS_ENV"] ||= "test"
require "minitest/mock"
require "rails"
+require "active_model"
require "action_controller"
require "pry"
require_relative "../lib/stimulus_reflex"
class TestApp < Rails::Application
@@ -30,9 +31,14 @@
class ActionDispatch::Request
def session
@session ||= SessionMock.new
end
+end
+
+class TestModel
+ include ActiveModel::Model
+ attr_accessor :id
end
StimulusReflex.configuration.parent_channel = "ActionCable::Channel::Base"
ActionCable::Server::Base.config.cable = {adapter: "test"}
ActionCable::Server::Base.config.logger = Logger.new(nil)