Module: ClassStubber

Defined in:
lib/generators/rider_kick/templates/spec/support/class_stubber.rb

Overview

ClassStubber provides utilities for creating test doubles of ActiveRecord models and ActiveStorage attachments in a clean, hash-based way.

Usage:

model = ClassStubber::Model.new(
  'id' => '123',
  'name' => 'Test Name',
  'avatar' => ClassStubber::ActiveStorageAttachment.new_single('http://example.com/avatar.jpg')
)

Defined Under Namespace

Classes: ActiveStorageAttachment, ActiveStorageAttachmentMultiple, ActiveStorageAttachmentSingle, Model