How to Mock JSON with $httpBackend in Jasmine

There is a lot of information out there on running tests for Angular using Jasmine + Karma. One thing that was tripping me up, though, was being able to access a mock JSON file, rather than trying to hit a server with an HTTP request every test. Working from this code sample, I injected the mock file with the beforeEach call. However, I wasn’t able to access the JSON response until I injected the defaultJSON directly into the specific test: ...

Aug 8, 2014 · Christopher Boette

Mars Attracts!

Book a Flight to Mars! (Not Really) project | source code developer, designer A speculative fiction flight reservation app set in the near future, facilitating relocation to a newly colonized Mars. Built over 2+ weeks as part of a team of three. Tech Stack Angular.js frontend Ruby on Rails backend ForecastIO & MAAS Mars Weather APIs Foundation & Simple_Form Ruby gems Haml & Sass templating PostgreSQL database Deployed to Heroku

Jan 31, 2014 · Christopher Boette