RSpec - a gentle introduction to testing
03-Dec-2020 1449
Writing useful tests is as important as writing the right code. The good news is that with Ruby, testing the code is a friendly and grateful task. The bad news is that it might be a little hard for you if you never wrote a single line of code. However, once you understand why tests are needed and how to write efficient tests, it will become a habit to always assure good code coverage for things you create.RSpec is a domain-specific language (and Ruby makes implementing DSL’s easy!) created to test Ruby’s code. Simple as that. Because it’s a DSL, it allows you to easily read code that becomes a part of the documentation. Experience in RSpec is mentioned in most job offers these days, so it’s valuable knowledge and may be beneficial in the future for you if you plan to work as a Ruby developer. And yes, you can use it outside of Rails.
RSpec - a gentle introduction to testing #ruby #rubydeveloper #rubyonrails #RSpec #gentle #introduction #testing #rspec #testing https://rubyonrails.ba/link/rspec-a-gentle-introduction-to-testing