o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1318617538.3454368£: @value{ I" length:EFi I" digest; F"%66d30eb1e5ba09b50f134db441dcd56eI" source; FI" beforeEach(function() { this.addMatchers({ toBePlaying: function(expectedSong) { var player = this.actual; return player.currentlyPlayingSong === expectedSong && player.isPlaying; } }) }); (function() { describe("TDD JavaScript, Rails 3.1 and the Asset Pipeline", function() { return it("Are you TDD'ing your JS?", function() { var tests; tests = "no tests D:"; return expect(tests).toBe('lots of tests :D'); }); }); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; describe('Player', function() { beforeEach(function() { this.player = new Player(); return this.song = new Song(); }); it('should be able to play a Song', function() { this.player.play(this.song); expect(this.player.currentlyPlayingSong).toEqual(this.song); return expect(this.player).toBePlaying(this.song); }); describe('when song has been paused', function() { beforeEach(function() { this.player.play(this.song); return this.player.pause(); }); it('should indicate that the song is currently paused', function() { expect(this.player.isPlaying).toBeFalsy(); return expect(this.player).not.toBePlaying(this.song); }); return it('should be possible to resume', function() { this.player.resume(); expect(this.player.isPlaying).toBeTruthy(); return expect(this.player.currentlyPlayingSong).toEqual(this.song); }); }); xit('tells the current song if the user has made it a favorite', function() { var spy; spy = sinon.spy(this.song, 'persistFavoriteStatus'); this.player.play(this.song); this.player.makeFavorite(); return expect(spy).toHaveBeenCalled(); }); return describe('#resume', function() { return it('should throw an exception if song is already playing', function() { this.player.play(this.song); return expect(__bind(function() { return this.player.resume(); }, this)).toThrow('song is already playing'); }); }); }); }).call(this); // This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // ; ; FI" _version; F"%2be9ed83011afb66ace651d86ab9f4ad