Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Unit-Testing AngularJS in a Rails app using the Jasmine gem

Testing AngularJS applications is easy with Jasmine. If you look at the AngularJS docs, many of the code examples show a corresponding Jasmine spec.

One important part of AngularJS’s testing support is the included angular-mocks.js file. This file contains a module called NgMock that provides a set of fake services for things such as HTTP requests, in order to make them easier to unit test.

Read more »

LABS
Rails is omakase; so is AngularJS

Opinions

DHH, one of the creators of Rails wrote a seminal blog post about Rails’ configurability and design to permit choice, while still presenting opinions on application structure. This sits well with my general sense of what’s right. I like things that don’t force me to make arbitrary decisions early on in development.

Read more »

LABS
Writing Beautiful Specs with Jasmine Custom Matchers

Custom matchers are one of Jasmine’s most powerful, and yet underutilized, features.

Here at Pivotal Labs, we write tests for a few reasons: to drive feature development, to catch regressions, and to provide code documentation to other developers.  Because of this, it is important that our tests are not only comprehensive, but also descriptive and legible.

Read more »

LABS
Keeping the Console Clean in Jasmine

I like running Jasmine with the console open.  It gives you insight into various errors that you may not have tests around but may still show up in the console messages.  It can detect anything from poorly written tests that fail to run at all to accidentally checked-in console logs.

Read more »

LABS
Jasmine For Python – A Whole New World

Although many think of Pivotal Labs as a Rails consulting firm, our broadening client base regularly comes to us with different technical stacks. Among these, Python and Django lead the pack.

When Pivotal Labs begins work into any new environment, we need a base level of tooling to be as fast as Pivots and clients expect us to be.

Read more »

LABS
Geek glossary: spy

So spies are pretty easy. They’re test doubles, used like mocks, but instead of setting up expectations before an event, you check the state of the spy after the event, since it records every known message sent to it.

Spy frameworks haven’t taken off in Ruby as much as in other languages, such as JavaScript.

Read more »

LABS
Sencha Touch BDD – Part 5 – Controller Testing

Sencha Touch BDD tl;dr

A multi-part series of articles on how to test Sencha Touch applications. It uses Jasmine for unit testing and Siesta for integration testing.

Part 5 – Controller Testing Recap

Part 4 Introduced PhantomJS as an easy and faster alternative to headful Jasmine testing.

Read more »

LABS
Sencha Touch BDD – Part 4 – PhantomJS

Sencha Touch BDD tl;dr

A multi-part series of articles on how to test Sencha Touch applications. It uses Jasmine for unit testing and Siesta for integration testing.

Part 4 – Headless testing using PhantomJS

Part 3 added jasmine-ajax so we can verify that stores and models react properly to back-end data.

Read more »

LABS
Launching Focused Jasmine Specs From RubyMine

RubyMine is great for launching focused rspec tests, but is a little trickier for launching Jasmine specs, but we have had it working on my current project using a shell script and RubyMine external tools .  The script relies on using sed to parse the first line of your spec file, so this actually only runs the describe block at the top of your file.  

Read more »

LABS
Sencha Touch BDD – Part 3 – Testing Views and Mocking Stores

Sencha Touch BDD tl;dr

A multi-part series of articles on how to test Sencha Touch applications. It uses Jasmine for unit testing and Siesta for integration testing.

Part 3 – Testing Views and Mocking Stores

In Part 1 I showed you how to set up your Sencha Touch development environment to use the Jasmine JavaScript test framework.

Read more »