jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Trying to use jasmine 2.0.0 against teaspoon 1.0.2 and getting an error #431

Closed rstudner closed 8 years ago

rstudner commented 8 years ago

If I have:

//= require support/jasmine-jquery-1.7.0
//= require support/sinon

my test runs fine.

if I change it to:

//= require support/jasmine-jquery-2.0.0
//= require support/sinon

I get the error:

TypeError: jasmine.addMatchers is not a function
TypeError: jasmine.addMatchers is not a function
    at null.<anonymous> (http://localhost:3000/assets/support/jasmine-jquery-2.0.0.js?body=1:353:13)
    at jasmine.Block.execute (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:1066:17)
    at jasmine.Queue.next_ (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2098:31)
    at jasmine.Queue.start (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2051:8)
    at jasmine.Spec.execute (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2378:14)
    at jasmine.Queue.next_ (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2098:31)
    at jasmine.Queue.start (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2051:8)
    at jasmine.Suite.execute (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2523:14)
    at jasmine.Queue.next_ (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2098:31)
    at jasmine.Queue.start (http://localhost:3000/assets/jasmine/1.3.1.js?body=1:2051:8)
jejacks0n commented 8 years ago

figure you determined it was because you didn't change your version of jasmine?

rstudner commented 8 years ago

Yes hah. Now of course I can't seem to change my version of jasmine, but I'm reading the docs

apparently this isn't it:

    # Note: If no version is specified, the latest is assumed.
    #
    # Available: jasmine[1.3.1], mocha[1.10.0, 1.17.1] qunit[1.12.0, 1.14.0]
    suite.use_framework :jasmine, "1.3.1"  

Changing that to 2.0.0 didn't work, but leaving it blank worked (use the latest version per the docs).

Thanks:)