Sha256: 8374318c8640ec28c27c754ef4b876c57f411b915d27ec72c26ff98c7a7d8404

Contents?: true

Size: 394 Bytes

Versions: 24

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

module PublifyCore
  module TestingSupport
    module UploadFixtures
      module_function

      # Provide file upload helper for all specs
      def file_upload(file = "testfile.txt", mime_type = "text/plain")
        Rack::Test::UploadedFile.new(File.join(__dir__, "fixtures", file),
                                     mime_type)
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
publify_core-10.0.2 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.5.0 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.4.0 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.3.0 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.2.0 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-10.0.1 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-10.0.0 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.10 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.1.1 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.1.0 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.0.3 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.0.2 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.0.1 lib/publify_core/testing_support/upload_fixtures.rb
HornsAndHooves-publify_core-10.0.0 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.9 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.8 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.7 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.6 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.5 lib/publify_core/testing_support/upload_fixtures.rb
publify_core-9.2.4 lib/publify_core/testing_support/upload_fixtures.rb