Rafe Draper's Blog

HomeBadges

Rendering Forms with Rails 6 (GREEN)

Jul 16, 20205 min read

Today I learned a new way to render forms from my views with a Rails method, especially for Forms: form_with. My previews post was about how display a form with previously written data, edit the form and then submit it to update the element in questi...

Rendering Forms with Rails 6 (RED)

Jul 14, 20208 min read

After testing my controllers on my previous post, I encountered I wanted to add an edit button to my views and allow the chance to edit a previous entry in case there was an error. So I began finding more and more questions and how can this be implem...

Hashes and expectations with RSpec (GREEN)

Jul 7, 20206 min read

My previews post was about testing my controllers and tried to understand why they were not passing and the alternatives I had. With the help of my mentor I manage to understand how my test was working, why it was failing and of course new questions ...

Hashes and expectations with RSpec (RED)

Jun 29, 20206 min read

Today I wrote a pair of tests for my controller and found a couple of things I would like to understand in deep and begin to practice them more. While testing the #delete from my controller in my controller tests, I needed to test if at the end the c...

Testing my Controller

Jun 8, 2020

I have worked this week on testing my controller for my Rails application, and I found something interesting about strong parameters and my results, of course I would like to dig deeper and learn more about why this difference shows in my tests. Firs...

Testing Devise with RSpec (Rails 6+)

May 20, 2020

Today I learned how to test Devise with RSpec and Capybara. I used the Devise gem to authenticate my users, there are other alternatives like CanCan but I haven't tried yet. First of all, why bothering testing now all the things if : "Applications is...

© 2021 Rafe Draper's Blog

PrivacyTerms
Proudly part of