Sha256: 6c015d00bb69ab0b62a2d2da0509583868fe18aad5c770f146f9ecf5d348f12b

Contents?: true

Size: 295 Bytes

Versions: 83

Compression:

Stored size: 295 Bytes

Contents

module Spree
  module TestingSupport
    module ImageHelpers
      def create_image(attachable, file)
        image = attachable.images.new
        image.attachment.attach(io: file, filename: File.basename(file))
        image.save!
        file.rewind
        image
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
spree_core-4.10.1 lib/spree/testing_support/image_helpers.rb
spree_core-4.10.0 lib/spree/testing_support/image_helpers.rb
spree_core-4.9.0 lib/spree/testing_support/image_helpers.rb
spree_core-4.8.3 lib/spree/testing_support/image_helpers.rb
spree_core-4.8.2 lib/spree/testing_support/image_helpers.rb
spree_core-4.7.3 lib/spree/testing_support/image_helpers.rb
spree_core-4.6.6 lib/spree/testing_support/image_helpers.rb
spree_core-4.5.5 lib/spree/testing_support/image_helpers.rb
spree_core-4.0.9 lib/spree/testing_support/image_helpers.rb
spree_core-4.1.15 lib/spree/testing_support/image_helpers.rb
spree_core-4.2.7 lib/spree/testing_support/image_helpers.rb
spree_core-4.3.3 lib/spree/testing_support/image_helpers.rb
spree_core-4.4.1 lib/spree/testing_support/image_helpers.rb
spree_core-4.5.4 lib/spree/testing_support/image_helpers.rb
spree_core-4.6.5 lib/spree/testing_support/image_helpers.rb
spree_core-4.7.2 lib/spree/testing_support/image_helpers.rb
spree_core-4.7.1 lib/spree/testing_support/image_helpers.rb
spree_core-4.6.4 lib/spree/testing_support/image_helpers.rb
spree_core-4.7.0 lib/spree/testing_support/image_helpers.rb
spree_core-4.6.3 lib/spree/testing_support/image_helpers.rb