lib/ui_helper.rb in test-harness-0.4.0 vs lib/ui_helper.rb in test-harness-0.4.1
- old
+ new
@@ -1,9 +1,10 @@
class TestHarness
class UIHelper
def self.register_ui_components
Dir.glob(Rails.root.join('app', 'test_harness', 'ui/*.rb')).each do |file|
component = File.basename(file, '.rb')
+ require "ui/#{component}"
klass = ("TestHarness::%s::%s" % [component.camelize, self.name.split('::').last]).constantize
TestHarness.register_instance_option(self, component, klass.new)
klass.send(:include, TestHarness::UIComponentHelper)
klass.send(:include, TestHarness::TestHelper)
end