Class: ClassStubber::ActiveStorageAttachment
- Inherits:
-
Object
- Object
- ClassStubber::ActiveStorageAttachment
- Defined in:
- lib/generators/rider_kick/templates/spec/support/class_stubber.rb
Overview
ActiveStorage attachment stub for single file attachments
Class Method Summary collapse
-
.new_multiple(urls = []) ⇒ ActiveStorageAttachmentMultiple
Creates a stub for multiple file attachments (has_many_attached).
-
.new_single(url) ⇒ ActiveStorageAttachmentSingle
Creates a stub for a single file attachment (has_one_attached).
Class Method Details
.new_multiple(urls = []) ⇒ ActiveStorageAttachmentMultiple
Creates a stub for multiple file attachments (has_many_attached)
63 64 65 |
# File 'lib/generators/rider_kick/templates/spec/support/class_stubber.rb', line 63 def self.new_multiple(urls = []) ActiveStorageAttachmentMultiple.new(urls) end |
.new_single(url) ⇒ ActiveStorageAttachmentSingle
Creates a stub for a single file attachment (has_one_attached)
55 56 57 |
# File 'lib/generators/rider_kick/templates/spec/support/class_stubber.rb', line 55 def self.new_single(url) ActiveStorageAttachmentSingle.new(url) end |