Tag

Your search for BDD/TDD returned 4 results.


DRY up Rspec with tap!

I'm a big fan of keeping Rspec DRY. Mostly, because it hurts my heart to have to write the same thing twice. It huuuurts. Here's a great article on code reuse in Rspec. A scenario I struggle with DRYing up: I'd like to either stub! or call should_receive on a method and sometimes return a value. Previously, I would still have to write the stub! or should_receive ...

Read More


Stubbing Backbone.js fetch with Jasmine & Sinon.js

I needed to stub out a Backbone collection's fetch method and make it return success. I'm using Jasmine BDD for the testing framework and Sinon.js for stubbing the methods. Here's how I did it: (more…)

Read More


Testing Jammit’s packaged assets with Jasmine

In my new job, I'm trying to start things out right -- behavior-driven, test-driven, "cutting-edge" tools (whatever the hell that means), etc. I've gone through the new Rspec book (review to come) and used Cucumber and Rspec on my Rails app. I recently re-did the front-end with Backbone.js (and I am ready to marry it) and now I'm testing the javascript with Jasmine ...

Read More


Debugging Cucumber in RubyMine {Quick Hit}

Using Cucumber and Rspec for the first time has been ... a little frustrating. I followed along with the main tutorial in The Rspec Book and then skimmed the later chapters. I thought it was quite good until I had to start testing an actual rails app and felt a little at a loss. But I digress ... (more…)

Read More