Open in app
Clay Shentrup
244 Followers
About

Sign in

244 Followers
About
Open in app
Clay Shentrup

Clay Shentrup

Oct 11, 2020·1 min read

How about this?

let!(:ip_record) do
create
(:ip_record) do |r|
# /spec/fixtures/foo.txt
r.attachments.attach(fixture_file_upload('foo.txt'))
end
end

Clay Shentrup

Advocate of Score Voting and Approval Voting. Software engineer. Father. Husband. American.

How to work with Active Storage attachment in RSpec
35
1

Ly Channa

  • Activestorage
  • Rails
  • Rspec
  • Attachment

More from Clay Shentrup

Advocate of Score Voting and Approval Voting. Software engineer. Father. Husband. American.

More From Medium

Tests & Dependencies

Clay Shentrup in Extreme Programming

Introduction to RSpec

Ray Alva in The Startup

How to: Data migration in rails 6

Janis Leuenberger

Exceptional Go

Clay Shentrup in Extreme Programming

3 tips to up your RSpec game

Emir Vatric in Level Up Coding

STAR Voting is SIMPLE

Clay Shentrup

How to Identify Someone With a Secure Attachment Style

Margaret Pan in Hello, Love

Upload images with your Rails app using Active Storage and Cloudinary

Victor G. Mestre

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store