【问题标题】:rspec, autotest and Rails 3 beta 2 can't find executable issuerspec、autotest 和 Rails 3 beta 2 找不到可执行问题
【发布时间】:2010-04-11 02:12:22
【问题描述】:

我正在运行 Rails 3 Beta2 并尝试让 Autotest 与 rspec 一起使用。

当我运行 autospec 时,我收到以下消息:

/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `bin_path': can't find executable autospec for rspec-2.0.0.beta.5 (Gem::Exception) from /usr/local/bin/autospec:19

我正在使用带有以下 Gem 的 Ruby 1.9.1:

导轨 (3.0.0.beta2) railties (3.0.0.beta2) rspec (2.0.0.beta.5) rspec-core (2.0.0.beta.5) rspec-expectations (2.0.0.beta.5) rspec-mocks (2.0.0.beta.5) rspec-rails (2.0.0.beta.5) ZenTest (4.3.1)

任何帮助将不胜感激。

【问题讨论】:

    标签: ruby-on-rails rspec autotest


    【解决方案1】:

    这是 rspec 的问题。
    Autospec 需要一个二进制文件,以便它知道要做什么。 在 rspec 1.3.0 中,there's one.

    在 rspec 2.0.0 中,没有 bin 目录,因此没有 autospec 文件。

    【讨论】:

      【解决方案2】:

      这篇博文把我整理出来了:http://blog.davidchelimsky.net/2010/03/15/rspec-2-and-autotest/

      autospec 已被弃用,取而代之的是带有一些额外配置的自动测试。

      在项目根目录的“./autotest/discover.rb”中添加:

      Autotest.add_discovery { "rspec2" }
      

      【讨论】:

        【解决方案3】:

        使用 rspec2 自动测试应该使用 autotest 而不是 autospec 运行

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-12-31
          • 1970-01-01
          • 1970-01-01
          • 2018-06-12
          相关资源
          最近更新 更多