【发布时间】:2012-10-01 05:59:28
【问题描述】:
真的很简单:我想用 CoffeeScript 编写基于 Jasmine 的 JS 单元测试,但我不想手动编译。运行 Jasmine,它不使用 Asset Pipeline 作为规范。
这里有什么好的解决方案?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 coffeescript jasmine
真的很简单:我想用 CoffeeScript 编写基于 Jasmine 的 JS 单元测试,但我不想手动编译。运行 Jasmine,它不使用 Asset Pipeline 作为规范。
这里有什么好的解决方案?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 coffeescript jasmine
为此,只需将 jasminerice、jasmine 添加到您的 Gemfile 并运行 bundle
创建包含内容的文件 spec/javascripts/spec.js.coffee:
#=require_tree ./
最好访问link了解更多详情
【讨论】: