Mocking Ajax Calls with Jasmine

I have been happily using Jasmine and Jasmine-JQuery on a project with great success. However, I was still unsure about how to handle mocking the ajax calls back to the server. It turns out the answer is already in Jasmine. Time to call out the spies! There is a wiki page on spies https://github.com/pivotal/jasmine/wiki/Spies, but I always enjoy a nice code sample. In my source file I have an ajax call that I would like to mock that looks like this: [gist id=957387] ...

May 5, 2011 · 1 min · Carin Meier

Hacking JavaScript for the Love of Clojure

Lately, I have been working on the awesome open source project 4Clojure.com. The site helps you to learn Clojure by solving “koan” type problems in an interactive format. One of the enhancements that I was looking at putting in was a way to enter code in a text box and have it color highlight as type. I found the ACE project, which looked like exactly what I wanted. However, sad panda, they didn’t have a Clojure mode. Not deterred, I decided that I would try to take a crack at it. I ported most of the rules from the Clojure brush in Syntax Highlighter over and implemented some basic auto-indent. ...

May 1, 2011 · 1 min · Carin Meier