Template for Testing with Jasmine

Drop in your code, drop in your Jasmine specs, and away you go!

HTML

<script src="http://searls.github.com/jasmine-all/jasmine-all-min.js"></script>

JavaScript

//--- SPECS -------------------------
describe("Random is one", function() {
  it("has a value of 1 with call fake", function() {
      spyOn(Math, 'random').andCallFake(function() {
          return 1;
      });
    expect(Math.random()).toBe(1);
  });
  it("has a value of 1 with and return", function() {
    spyOn(Math, 'random').andReturn(1); 
    expect(Math.random()).toBe(1);
  });
});