Module: TrainPluginBaseHelper
- Included in:
- TrainPluginFunctionalHelper
- Defined in:
- lib/train/plugin_test_helper.rb
Overview
Finally, let’s make some modules that can help us out.
Class Method Summary collapse
-
.included(base) ⇒ Object
Sneakily detect the location of the plugin source code when they include this Module.
Class Method Details
.included(base) ⇒ Object
Sneakily detect the location of the plugin source code when they include this Module
37 38 39 40 41 42 |
# File 'lib/train/plugin_test_helper.rb', line 37 def self.included(base) plugin_test_helper_path = Pathname.new(caller_locations(4, 1).first.absolute_path) plugin_src_root = plugin_test_helper_path.parent.parent base.let(:plugin_src_path) { plugin_src_root } base.let(:plugin_fixtures_path) { File.join(plugin_src_root, "test", "fixtures") } end |