Simplify method to calculate document max size

Since we're only doing the convertion from bytes to megabytes in one
place, IMHO adding an extra method makes the code harder to read.

This way we don't have do include the DocumentsHelper in the specs
anymore, reducing the risk of possible method naming collisions.
This commit is contained in:
Javi Martín
2020-04-16 12:04:10 +02:00
parent ca2dc10ee9
commit 95a90b1895
3 changed files with 1 additions and 6 deletions

View File

@@ -1,5 +1,4 @@
shared_examples "document validations" do |documentable_factory|
include DocumentsHelper
include DocumentablesHelper
let!(:document) { build(:document, documentable_factory.to_sym) }