Refactoring from feature specs to system specs
15-Sep-2023 1694
Lately, I've been writing a lot of RSpec tests, and I came upon a conundrum — Should I write feature specs, or system specs? Given that RSpec released system specs in 2017, it was surprisingly difficult to find an answer!Turns out, if your running Rails 5.1 , you should write system specs. If you've been writing feature specs though, it's OK! I was doing that too, and they work just fine.If you want to make the (simple) transition though, this article is for you. I start with a quick breakdown of the differences between RSpec's feature specs and system specs. Then, I walk you through converting your feature specs into system specs.
Refactoring from feature specs to system specs #ruby #rubydeveloper #rubyonrails #Refactoring #feature #specs #system #specs #refactoring https://rubyonrails.ba/link/refactoring-from-feature-specs-to-system-specs