Sha256: 96ae16ad68348e01db39b037d6bf1733d910f73159a82f72c400a365b01a14be

Contents?: true

Size: 940 Bytes

Versions: 23

Compression:

Stored size: 940 Bytes

Contents

describe("Player",function(){var e,t;beforeEach(function(){e=new Player,t=new Song}),it("should be able to play a Song",function(){e.play(t),expect(e.currentlyPlayingSong).toEqual(t),expect(e).toBePlaying(t)}),describe("when song has been paused",function(){beforeEach(function(){e.play(t),e.pause()}),it("should indicate that the song is currently paused",function(){expect(e.isPlaying).toBeFalsy(),expect(e).not.toBePlaying(t)}),it("should be possible to resume",function(){e.resume(),expect(e.isPlaying).toBeTruthy(),expect(e.currentlyPlayingSong).toEqual(t)})}),it("tells the current song if the user has made it a favorite",function(){spyOn(t,"persistFavoriteStatus"),e.play(t),e.makeFavorite(),expect(t.persistFavoriteStatus).toHaveBeenCalledWith(!0)}),describe("#resume",function(){it("should throw an exception if song is already playing",function(){e.play(t),expect(function(){e.resume()}).toThrow("song is already playing")})})});

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rearview-1.0.0.rc4-jruby public/rearview/vendor/jasmine/spec/PlayerSpec.js
rearview-1.0.0.rc3-jruby public/rearview/vendor/jasmine/spec/PlayerSpec.js
rearview-1.0.0.rc2-jruby public/rearview/vendor/jasmine/spec/PlayerSpec.js