0
rake jasmineを使用すると、すべてのテストがブラウザで行われます。rake jasmineはなぜrake jasmineに合格するのですか?ciはTypeErrorで失敗します:undefined is not function?
すくいジャスミンでは、2つのスペックはで失敗:それは
src_files:
- src/Player.js
- src/Song.js
spec_files:
- '**/*[sS]pec.js'
src_dir:
spec_dir: spec
src/Song.js
を持つように私は私のspec/javascripts/support/jasmine.yml
ファイルを構成した
TypeError: undefined is not a function (evaluating 'expect(player).not.toBePlaying(song)') in http://localhost:36091/__spec__/PlayerSpec.js (line 28)
があります
function Song() {
...
のはなぜですrake jasmine:ci
この2つの例では失敗しますか?
最初の失敗1のコードは次のとおりです。私はそれを削除した場合、すべての5例が失敗するので
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
がロードされているように見えるん。