Skip to content

Commit

Permalink
add bang.o
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Jan 23, 2025
1 parent f7eb479 commit 9c0dcbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/trailblazer/test/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions test/activity_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.(
Expand All @@ -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
Expand Down

0 comments on commit 9c0dcbc

Please sign in to comment.