Branching and configuration belie uncertainty.
Are your step definitions 10+ lines long? Are you relying too much on state to test? Do you get confused when you read your tests back?
I believe that opinionated specifications are the best tests. They focus in on detail and cut through lines of integration that make tests slow and brittle. They restrict degrees of freedom, making . . .
If you're using Ruby and RSpec with RSS you can save a lot of quick checking time by using functional programming.
After loading in the RSS feed, you can use the following transforms on the data:
def descriptions items.map(&:description) end def missing_any?(field_sym) fields = send(field_sym) . . .
I thought it would be a fun experiment to list the tools I work with on (at least) a daily basis at work:
- Selenium WebDriver
These tools all have one very important thing in common: they are F/OSS. I've recently been doing some . . .
You should, too. (but whitelist sites that respect you)
I block ads because they abuse my trust and privacy and generally assault my senses. Hyperbolic? Not really.
If you can slot without offending visitors to your site, do it. Respect trust, respect privacy, and serve clean ads. Here's a few examples of how to do it right:
Sponsorship Forecast.io does it on a weekly . . .
The former is about handling exceptions in Ruby with grace, even preventing them in some case. The latter is about a crazy thing called a combinator, which is a . . .
Subtleties of Cucumber test definitions
The task: write a test step that verifies an image is in the correct aspect ratio. On our first pass, we can:
- verify exact pixel dimensions
- check the request url for an aspect in the request
- assert the proportions of the actual image
Exact pixel dimensions
Then /^the image dimensions are (\d+) by (\ . . .
I have a test suite that currently takes 4:30 to run, and I guessed that it's the browser slowing it down. My tests use cucumber, so these hooks take care of stateful tests while cutting down time to run for every other test:
Before('@stateful') do |scenario| kill_browser end After('@stateful') do | . . .