Moove It is now Qubika. For more information, visit our new website
Visit Qubika

DevSnack #7: Here are some tips and tools to help you improve readability, maintainability and reliability of your Ruby code and test suite. Enjoy our tips on Ruby testing.

#1 – How good are your Ruby tests? Testing your tests with mutant

If you think that having 100% code coverage in your tests is enough, think again. Andrzej Krzywda (@andrzejkrzywda) shows us how mutant can help us improve the reliability of our test suite.

#2 – Feature testing with RSpec

Feature testing is a key part of any testing suite, in this article Luke Morton (@LukeMorton) talks about his experience creating feature tests and shares some tips he found useful.

#3 – Using RSpec Shared Contexts to Ensure API Consistency

Some of the advantages of RSpec Shared Context are code readability and code reuse, but something that gets overlooked is that they can help in keeping things consistent! Read the article from Charlie Tanksley (@charlietanksley) to find out more.

#4 – Extract a service object using SimpleDelegator

Andrzej Krzywda (@andrzejkrzywda) strikes again with some useful tips on how to clean up those messy Rails controllers.

#5 – Five Ruby Methods You Should Be Using

In this article by Ben Lewis (@fluxusfrequency), you will find some less known Ruby methods that can help us improve our code.


Creative Commons License
DevSnack by Moove-it is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Get our stories delivered from us to your inbox weekly.