jejacks0n / teaspoon

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

using jasmine 2.0.0 failing with Uncaught TeaspoonError: Jasmine not found #215

Closed skbailey closed 9 years ago

skbailey commented 10 years ago

ruby 2.1.1 rails 4.1.0

created a brand new rails app:

rails new teaspoon_jasmine2 --skip-active-record

installed the teaspoon:

rails generate teaspoon:install

updated teaspoon_env.js with:

suite.use_framework :jasmine, "2.0.0"
suite.javascripts = ["jasmine/2.0.0", "teaspoon-jasmine"]

and ensured all the files are precompiled via:

$ cat config/initializers/assets.rb 
Rails.application.config.assets.precompile += %w( teaspoon.css jasmine/2.0.0.js teaspoon-jasmine.js teaspoon-teaspoon.js)

running rake teaspoon fails with:

Uncaught TeaspoonError: Jasmine not found -- use `suite.use_framework :jasmine` and adjust or remove the `suite.javascripts` directive. teaspoon-jasmine.js?body=1:1158
Uncaught ReferenceError: describe is not defined 

when running the rails server on /teaspoon we get the same error.

The jasmine2.0.0 file is loaded correctly from the asset pipeline though.

SoldierCoder commented 10 years ago

The error message is telling you what to do -- remove the suite.javascripts directive

edariedl commented 10 years ago

I have same problem, but I am using only suite.use_framework :jasmine, "2.0.0". It gives me the following error:

→ rake teaspoon
Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:58558/teaspoon/default
TeaspoonError: Jasmine not found -- use `suite.use_framework :jasmine` and adjust or remove the `suite.javascripts` directive.
  # teaspoon-jasmine.js:1158
  # teaspoon-jasmine.js:1339

Execution halted.
edariedl commented 10 years ago

If I change it to suite.use_framework :jasmine, "1.3.1" everything works great.

skbailey commented 10 years ago

That's the same fix I'm using for now, not sure why 2.0.0 doesn't work. I tried removing that directive but same issue.

noelrappin commented 10 years ago

I am having the same issue. Does Teaspoon work with Jasmine 2.0?

jejacks0n commented 10 years ago

It does not.. there's a pull request I was working on that I haven't finished.

noelrappin commented 10 years ago

Might I humbly request that the current status be noted more prominently in the readme?

jejacks0n commented 10 years ago

You may, but I a pull request to remove it from the available list would be more appreciated. I thought it would be easier than it is to add support, and decided I'd do it more iteratively -- and haven't had the time to finish it.

jejacks0n commented 10 years ago

for the record, Jasmine 2 makes it impossible to do a few things, and I'll have to submit pull requests on that project to make it viable with teaspoon.

noelrappin commented 10 years ago

Pull request subitted

chriscabral commented 10 years ago

@jejacks0n, how is the PR for jasmine 2.0 support coming?

jwliechty commented 10 years ago

+1

jrust commented 10 years ago

:+1:

dgobaud commented 10 years ago

:+1: 2.0 support would be great!

charlotte-miller commented 10 years ago

:+1: @jejacks0n - thanks for taking this on! FYI - There are a lot of (misleading) references to Jasmine 2.0 in the generated teaspoon_env.rb

coderjonny commented 9 years ago

+1 :+1: How's this coming along?

VitorHP commented 9 years ago

:+1:

rstudner commented 9 years ago

+1 :)

jejacks0n commented 9 years ago

It's painful, but I'll try to get back into it sometime soon.

samu commented 9 years ago

:+1: @jejacks0n Is there any way we could help?

coderjonny commented 9 years ago

:+1: @samu ^

jejacks0n commented 9 years ago

closing this.. we may get to this before a 1.0 release.

mikepack commented 9 years ago

Jasmine 2 support is in Teaspoon 1.0.

Sinetheta commented 9 years ago

Thanks @mikepack, I saw that when I re-read and discovered that factories like gem 'teaspoon-jasmine are now separate.