Recently I added the first high-level test to a Sinatra app with no tests. This required a lot of initial setup, involving, among other things, RSpec, Rake::Test, Capybara, EmailSpec and Pony, mocking OmniAuth callbacks, and using DatabaseCleaner with Sequel. For the benefit of my future self and anyone else who needs to set up Sinatra for acceptance-level tests, I documented the whole process.
avdi — 26 posts
Screencast on file random access thechangelog.com
The Changelog blog is hosting a video I did on using
#tellto navigate files. It's the beginning of a series on cloning the UNIX tail(1) command in Ruby.
Struct Screencast rubytapas.com
I just released an early RubyTapas episode on Ruby's
Structclass for free. It's a quick intro to what the class does and how, if you aren't using it already, it may just be your new best friend. Also gets into some more advanced
Structfeatures you might not be aware of, as well as a short discussion of Ruby's special treatment of anonymous classes.
I just released a gem called Naught for implementing the Null Object pattern. While Null Objects aren't exactly difficult to create by hand, Naught has some features you may find helpful.
RubyTapas 100th episode giveaway rubytapas.com
Introducing RubyTapas screencasts devblog.avdi.org
Today I'm launching RubyTapas, my subscription screencast series. These are short (1-5 minute) videos, released three days a week, demonstrating intermediate to advanced Ruby features, idioms, and libraries. The first episode is up and available for free!
Using the "and" and "or" operators avdi.org
Recently I noticed some consternation about "and" and "or" and how they differ from && and ||. So I wrote an article about when and how to use Ruby's "and" and "or" operators.
Drive complex command-line interactions from Ruby with Greenletters. Use for automating procedures, or for testing your apps. Cucumber step definitions included!
I just released a very rough but usable version of Firetower. You can use it to interact with Campfire chats from the command line, as well as to build arbitrary event-driven Campfire apps (bots, notifiers, etc.).