Skip to content

Commit

Permalink
introduce :source_gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Nov 14, 2023
1 parent c5d2074 commit 6edd395
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/trailblazer/core/utils/convert_operation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Utils

# TODO: add {skip}
module ConvertOperationTest
def self.call(filepath, target:)
def self.call(filepath, target:, source_gem:)
within_marker = false
within_ignore = false
within_ctx_to_result = false
Expand Down Expand Up @@ -76,7 +76,7 @@ def self.call(filepath, target:)

# op_test.insert(1, "module Autogenerated")
# op_test << "end"
op_test.insert(1, "# THIS FILE IS AUTOGENERATED FROM #{filepath}\n")
op_test.insert(1, "# THIS FILE IS AUTOGENERATED FROM #{source_gem}/#{filepath}\n")

File.write target, op_test.join("")
end
Expand Down
4 changes: 2 additions & 2 deletions test/convert_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ class ConvertTest < Minitest::Spec
it "what" do
FileUtils.rm(Dir.glob("test/ruby/operation/*.rb"))

Trailblazer::Core.convert_operation_test("test/ruby/activity_test.rb", target: "test/ruby/operation/activity_test.rb")
Trailblazer::Core.convert_operation_test("test/ruby/activity_test.rb", target: "test/ruby/operation/activity_test.rb", source_gem: "trailblazer-activity")

assert_equal File.read("test/ruby/operation/activity_test.rb"), %(require "test_helper"
# THIS FILE IS AUTOGENERATED FROM test/ruby/activity_test.rb
# THIS FILE IS AUTOGENERATED FROM trailblazer-activity/test/ruby/activity_test.rb
module X
class DocsActivityTest < Minitest::Spec
Expand Down

0 comments on commit 6edd395

Please sign in to comment.