diff --git a/lib/trailblazer/test/endpoint.rb b/lib/trailblazer/test/endpoint.rb index c205780..76d0347 100644 --- a/lib/trailblazer/test/endpoint.rb +++ b/lib/trailblazer/test/endpoint.rb @@ -3,7 +3,7 @@ module Test # DISCUSS: this is not really endpoint related, it's more like setting a "global" invocation mechanism. module Endpoint # DISCUSS: not sure this is the final "technique" to use the global endpoint invoker. - def self.module(receiver, invoke_method:, invoke_method_wtf:) + def self.module!(receiver, invoke_method:, invoke_method_wtf:) receiver.class_eval do @@INVOKE_METHOD = invoke_method @@INVOKE_METHOD_WTF = invoke_method_wtf diff --git a/test/activity_test.rb b/test/activity_test.rb index 611a2ff..6036960 100644 --- a/test/activity_test.rb +++ b/test/activity_test.rb @@ -107,9 +107,7 @@ class EndpointWithActivityTest < Minitest::Spec Create = AssertionActivityTest::Create Memo = Trailblazer::Test::Testing::Memo - include Trailblazer::Test::Assertion - include Trailblazer::Test::Assertion::Activity - include Trailblazer::Test::Assertion::AssertExposes + Trailblazer::Test::Assertion.module!(self, activity: true) def self.__(activity, options, **kws, &block) # TODO: move this to endpoint. signal, (ctx, flow_options) = Trailblazer::Endpoint::Runtime.( @@ -125,7 +123,7 @@ def self.__(activity, options, **kws, &block) # TODO: move this to endpoint. def self.__?(*args, &block) __(*args, invoke_method: Trailblazer::Developer::Wtf.method(:invoke), &block) end - include Trailblazer::Test::Endpoint.module(self, invoke_method: method(:__), invoke_method_wtf: method(:__?)) + include Trailblazer::Test::Endpoint.module!(self, invoke_method: method(:__), invoke_method_wtf: method(:__?)) def self._flow_options