真的很简单:我想用 CoffeeScript 编写基于 Jasmine 的 JS 单元测试,但我不想手动编译。运行 Jasmine,它不使用 Asset Pipeline 作为规范。
这里有什么好的解决方案?
真的很简单:我想用 CoffeeScript 编写基于 Jasmine 的 JS 单元测试,但我不想手动编译。运行 Jasmine,它不使用 Asset Pipeline 作为规范。
这里有什么好的解决方案?
为此,只需将jasminerice、jasmine添加到您的 Gemfile 并运行bundle
创建文件 spec/javascripts/spec.js.coffee 的内容:
#=require_tree ./
最好访问此链接以获取更多详细信息