Skip to content

Commit

Permalink
Tests: adjust plugin detection assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
orien committed Feb 11, 2024
1 parent e0e1b8a commit 4208503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def stub_const(base, name, value)

def self.only_callbacks_for_plugin(callback)
line = caller(1..1).first
plugin_name = line[/\/plugins\/([^\/]+)/, 1] || raise("not called from a plugin not #{line}")
plugin_name = line[/^plugins\/([^\/]+)/, 1] || raise("not called from a plugin not #{line}")
around { |t| Samson::Hooks.only_callbacks_for_plugin(plugin_name, callback, &t) }
end

Expand Down

0 comments on commit 4208503

Please sign in to comment.