fou*_*nen 8 javascript assets ruby-on-rails jasmine asset-pipeline
我正在开发一个宝石,我已经安装了Jasmine https://github.com/pivotal/jasmine-gem/
我所需的所有JS文件都在app/assets/javascripts/application.js的清单文件中
//= require underscore
//= require backbone
//= require_tree .//vendor
//= require_tree .//custom
//= require_tree .//templates
//= require_tree .//models
//= require_tree .//collections
//= require_tree .//views
Run Code Online (Sandbox Code Playgroud)
我的jasmine.yml文件引用了:
src_files:
- 'app/assets/javascripts/application.js'
Run Code Online (Sandbox Code Playgroud)
但是它中指定的文件都没有加载.谁知道为什么?我正在使用最新的Jasmine 1.3.2,它应该支持资产管道,这样你就不需要使用像jasmine-rails这样的东西了.有什么想法吗?
在你的jasmine.yml中,路径应该是'assets/application.js'.如果您仍然遇到问题,请确保您的Gemfile中的开发和测试组都有您的jasmine gem,如https://github.com/pivotal/jasmine-gem上的说明中所述:
group :development, :test do
gem 'jasmine'
end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2994 次 |
| 最近记录: |