0
随着耙茉莉花我所有的测试通过浏览器。为什么耙茉莉花通过,但耙茉莉花:ci失败TypeError:undefined不是函数?
随着耙茉莉,2种规格失败:
TypeError: undefined is not a function (evaluating 'expect(player).not.toBePlaying(song)') in http://localhost:36091/__spec__/PlayerSpec.js (line 28)
我已经配置了我的spec/javascripts/support/jasmine.yml
文件,以便它具有
src_files:
- src/Player.js
- src/Song.js
spec_files:
- '**/*[sS]pec.js'
src_dir:
spec_dir: spec
src/Song.js
有:
function Song() {
...
为什么rake jasmine:ci
失败的这两个例子?
的第一个失败的代码是:
it("should be able to play a Song", function() {
player.play(song);
expect(player.currentlyPlayingSong).toEqual(song);
//demonstrates use of custom matcher
expect(player).toBePlaying(song); # <-- error here
});
Song.js
似乎被加载,因为如果我删除所有5例失败。