модуль ActiveRecord::TestFixtures
Публичные методы класса
# File activerecord/lib/active_record/test_fixtures.rb, line 22
Возвращает коллекцию ActiveRecord::FixtureSet
fixture_paths=(fixture_paths) Показать исходный код
# File activerecord/lib/active_record/test_fixtures.rb, line 31 class_attribute :fixture_paths, instance_writer: false, default: []
Публичные методы экземпляра
# File activerecord/lib/active_record/test_fixtures.rb, line 103 def fixture(fixture_set_name, *fixture_names) active_record_fixture(fixture_set_name, *fixture_names) end
Универсальный доступ к фикстурам по именам, которые могут конфликтовать с другими методами.
assert_equal "Ruby on Rails", web_sites(:rubyonrails).name assert_equal "Ruby on Rails", fixture(:web_sites, :rubyonrails).name
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.