我正在尝试运行 Heckle,但一直出现错误:
> spec spec/controllers/my_controller_spec.rb --heckle MyController
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! exception= has a thick skin. There's nothing to heckle.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(Runs through several mutations...)
/home/developer/.gem/ruby/1.8/gems/heckle-1.4.3/lib/heckle.rb:603:in `current_code': undefined method `translate' for Ruby2Ruby:Class (NoMethodError)
有什么想法吗?
编辑:我忘记了 gem 版本:
heckle (1.4.3)
ruby2ruby (1.2.3)
rails (2.3.2, 2.2.2)
rspec (1.2.6)
rspec-rails(1.2.6, 1.1.12)
最佳答案
安装 ruby2ruby 1.2.2。 1.2.3 中似乎有一个 API 更改。
看起来类方法“翻译”已被完全删除,尽管文档没有反射(reflect)这一点
关于ruby-on-rails - 运行 Heckle 时出错? `current_code' : undefined method `translate' for Ruby2Ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1144906/