-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Multiple Environments/Suites? #24
Comments
Looks like the answer is 'no' - you can only establish one jasminerice environment, which loads all the test libraries from spec/javascripts/spec.js.coffee. FYI - I'd like to establish multiple environments for two reasons:
|
This would definitely be useful! +1 |
I am using Rails 3.1.3 for mobile application with Backbone and using Jamsine for BDD. However is using Zepto. Will there be support for Zepto in the pipeline? +1 for it |
Actually it would be pretty easy to load multiple environments.
In the controller app/controllers/jasminerice/spec_controller.rb we could add
and change app/views/jasminerice/spec/index.html.haml to something like
Please some feedback on the idea before I try to implement this or somebody is free to implement and provide feedback and a pull request. |
Can we rename the question so that "environment" isn't used here since it confuses the hell out of it. It should be "suite" I believe. |
+1 for renaming 'environment' to 'suite'. My first reaction upon re-reading my own question was to think about development/test/production environments - and that is an incorrect way to think about this issue. Suites is a better term. |
@bradphelan thanks for your suggestions. I followed your advice and everything works. Here is my solution: In if %w(development test).include? Rails.env
mount Jasminerice::Engine => "/jasmine/:suite"
end In def index
@specenv = params[:suite].try(:concat, "_spec") || "spec"
end In %html
%head
%title Jasmine Spec Runner
= stylesheet_link_tag "jasmine"
= stylesheet_link_tag "spec"
= javascript_include_tag "jasminerice"
= javascript_include_tag @specenv
= csrf_meta_tags
%body Once this was done, I created three test suites: In
In
Then I ran each suite:
Everything worked perfectly. I'll send you a pull request with my changes. |
Very excited about this update! We just may start unit testing the javascript in our Rails app! ;) Is this now in the current release, or how soon will this feature be released? (Looks like the issue is still open, so I'm not sure what that means) Thanks!! |
From the Readme, it looks like you can establish only one jasmine rice environment:
I'd like to organize my tests into separate suites. Is there a way to establish multiple environments with jasminerice? Something like this in routes.rb:
Tx, Andy
The text was updated successfully, but these errors were encountered: