1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/lib/body_tracking/plugin_fixtures_loader.rb
cryptogopher d8a8d9f75e Added test_index_shows_and_hides_new_target_form
Removed redundant path asserts (checking path and page content is
either redundant or it's enough to check in one test only)
2020-08-20 21:59:33 +02:00

13 lines
451 B
Ruby

module BodyTracking::PluginFixturesLoader
def self.included(base)
base.class_eval do
def self.plugin_fixtures(*symbols)
plugin_fixtures_path = Rails.root.join('plugins', 'body_tracking', 'test', 'fixtures')
ActiveRecord::FixtureSet.create_fixtures(plugin_fixtures_path, symbols)
# ActiveRecord::TestFixtures#fixtures creates model_name(:fixture_name) accessors
fixtures *symbols
end
end
end
end