Skip to content

Commit

Permalink
Fix function that fetches a module by name to use identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Aug 20, 2021
1 parent c72f8f3 commit 12b9a10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/kafo/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def modules
end

def module(name)
modules.find { |m| m.name == name }
modules.find { |m| m.identifier == name }
end

def root_dir
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def wont_be_on_stdout(output, *args)
end

def fake_module(mod_name, params)
OpenStruct.new( { :class_name => mod_name, :name => mod_name, :enabled? => true, :params => params } ).tap do |m|
OpenStruct.new( { :identifier => mod_name, :class_name => mod_name, :name => mod_name.gsub('::', '_'), :enabled? => true, :params => params } ).tap do |m|
params.each { |p| p.module = m }
end
end
Expand Down

0 comments on commit 12b9a10

Please sign in to comment.