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:
Javi Martín
2020-04-15 21:02:58 +02:00
parent 7491f44d54
commit 2cd4696244
14 changed files with 5 additions and 27 deletions

View File

@@ -1,5 +1,4 @@
shared_examples "image validations" do |imageable_factory|
include ImagesHelper
include ImageablesHelper
let!(:image) { build(:image, imageable_factory.to_sym) }