https://github.com/pivotal/jasmine-gem

可参考上面的链接在Ruby中使用Jasmine,因为就是独立开发一个JavaScript的项目,所以我会使用 `jasmine init`来初始化一个项目。

但当运行 `rake jasmine`的时候发现会错误产生, Google 了一下,找到一文章,试验过后发现可用。

要修改对应的rakefile,多引入require 'yaml'

 

sample case:

begin
  require 'jasmine'
  require 'yaml' //自动生成的代码里是没这一行的
  load 'jasmine/tasks/jasmine.rake'
 
rescue LoadError
  task :jasmine do
    abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
  end
end 

 



相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2022-01-29
  • 2021-06-05
  • 2021-07-20
猜你喜欢
  • 2021-07-22
  • 2021-09-16
  • 2021-05-16
  • 2021-07-04
  • 2021-07-04
  • 2021-09-27
相关资源
相似解决方案