lib/trailblazer/activity/testing.rb in trailblazer-activity-0.11.5 vs lib/trailblazer/activity/testing.rb in trailblazer-activity-0.12.0

- old
+ new

@@ -60,14 +60,10 @@ Start = Activity::Start.new(semantic: :default) Failure = Activity::End(:failure) Success = Activity::End(:success) end - def Cct(activity) - Trailblazer::Developer::Render::Circuit.(activity) - end - # TODO: Remove this once all it's references are removed def implementing Implementing end @@ -141,11 +137,21 @@ process end def assert_circuit(schema, circuit) cct = Cct(schema) + cct = cct.gsub("#<Trailblazer::Activity::TaskBuilder::Task user_proc=", "<*") assert_equal %{#{circuit}}, cct end + + def Cct(activity) + Trailblazer::Developer::Render::Circuit.(activity, inspect_task: Trailblazer::Activity::Testing.method(:render_task)) + end + end + + # Use this in {#Cct}. + def self.render_task(proc) + Activity::Introspect.render_task(proc) end end end