Blog posts June 2011

Dependency management with CoffeeScript and Sprockets

Sprockets makes it really damn easy in a few lines of ruby to concatenate and serve your coffee script files. It supports multiple template engines ERB, JavaScript, CSS, SCSS, etc you can even add a dash of ERB <%= %> to your coffeescript source files by naming your file and sprock…

Read more

Stubbing out enumerable :each in Rspec

Ran into a tricky situation the other day trying mock out an enumerable object. I was trying to test a list of a files inside a Zip. However, I couldn't figure out how to yield a list of mocked ZipFile objects without monkey patching something inside Rubyzip which didn't seem very attractive at the …

Read more

2 blog posts