Episodes tagged with “testing”
Contributing to Open Source Other translations:
GitHub makes it easier than ever to contribute to open source with pull requests. Here we show how to submit a pull request to the VCR project.
Spork Other translations:
Spork improves the loading time of your test suite by starting up your Rails application once in the background. Use it with Guard for the ultimate combo in fast feedback while doing TDD.
Testing Time & Web Requests Other translations:
It can be difficult to test code that deals with the current time or an external web request. Here we show you how to do both using the Timecop and FakeWeb gems.
How I Test Other translations:
Here we show how we would add tests to the password reset feature created in the previous episode. We use RSpec, Capybara, Factory Girl, and Guard to make request, model, and mailer specs.
Guard Other translations:
Guard watches files and runs a command after a file is modified. This allows you to automatically run tests in the background, restart your development server, reload the browser, and more.
Request Specs and Capybara Other translations:
Testing Exceptions Other translations:
Even well tested code can sometimes raise exceptions. In this episode we show you how to be notified about this and how to resolve these errors by making use of integration tests.
Pickle adds a number of convenient Cucumber steps for generating models. Learn how to use Cucumber's table diffs as well.
Metric Fu is a compliation of tools that help you find the places in your code that need improvement. See what they have to say about the Railscasts codebase.
There's more to Cucumber than was shown in episode 155. Learn how to refactor complex scenarios in this episode.
Factories Not Fixtures Other translations:
Fixtures can make tests brittle and difficult to read. A better alternative is to use factories to create the necessary objects.
Improve readability and remove duplication in RSpec by making use of matchers and macros.
Using Webrat allows you to write integration tests in Ruby, rather than in English as you would with Cucumber.
Beginning With Cucumber Other translations:
Cucumber is a testing framework that lets you develop with Behaviour-Driven Development. We develop a new application using BDD in this episode.
Refactoring User Name Part 3 Other translations:
In the final part of the episodes on testing and refactoring we'll refactor our test code.
Refactoring User Name Part 2 Other translations:
Having moved code from the view to the model in part one, we'll refactor it and write some tests to make sure it all still works as expected.