Why DSLs are a necessary part of learning Rails testing - Code with Jason
02-Jun-2022 1047
If you want to be a competent Rails tester, there are a lot of different things you have to learn. The things you have to learn might be divided into three categories.The first of these three categories is tools. For example, you have to choose a testing framework and learn how to use it. Then there are principles, such as the principle of testing behavior vs. implementation. Lastly, there are practices, like the practice of programming in feedback loops.This post will focus on the first category, tools.For better or worse, the testing tools most commercial Rails projects use are RSpec, Factory Bot and Capybara. When developers who are new to testing (and possibly Ruby) first see RSpec syntax, for example, they’re often confused.Below is an example of a test written using RSpec, Factory Bot and Capybara. To a beginner the syntax may look very mysterious.
Why DSLs are a necessary part of learning Rails testing - Code with Jason #ruby #rubydeveloper #rubyonrails #necessary #learning #Rails #testing #Jason #code #learning #testing https://rubyonrails.ba/link/why-dsls-are-a-necessary-part-of-learning-rails-testing-code-with-jason