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,5 +1,4 @@
|
||||
shared_examples "image validations" do |imageable_factory|
|
||||
include ImagesHelper
|
||||
include ImageablesHelper
|
||||
|
||||
let!(:image) { build(:image, imageable_factory.to_sym) }
|
||||
|
||||
Reference in New Issue
Block a user