Don't include unneeded helpers in tests
Including them might lead to conflicts since two methods might have the same name. For example, we're getting some exceptions when taking screenshots of a failing test, because the method `image_path` from `ActionView::Helpers::AssetUrlHelper` has the same name as a method used to save the screenshot. Besides, we were including all helpers in places were only the `dom_id` method is used, and in other places where no helper methods were used at all. So we can just invoke `ActionView::RecordIdentifier.dom_id` directly.
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
shared_examples "nested documentable" do |login_as_name, documentable_factory_name, path, documentable_path_arguments, fill_resource_method_name, submit_button, documentable_success_notice|
|
||||
include ActionView::Helpers
|
||||
include DocumentsHelper
|
||||
include DocumentablesHelper
|
||||
|
||||
let!(:administrator) { create(:user) }
|
||||
let!(:user) { create(:user, :level_two) }
|
||||
let!(:arguments) { {} }
|
||||
|
||||
Reference in New Issue
Block a user