[英]RSpec Error - “Invalid Option”
I keep getting an issue when running RSpec with Autotest. 使用Autotest运行RSpec时,我一直遇到问题。 My ~/.autotest file looks like this:
我的〜/ .autotest文件如下所示:
require 'autotest/growl'
require 'autotest/fsevent'
Autotest.add_hook :initialize do |autotest|
autotest.add_mapping(/^spec\/requests\/.*_spec\.rb$/) do
autotest.files_matching(/^spec\/requests\/.*_spec\.rb$/)
end
end
Any thoughts on what's wrong? 有什么问题的想法吗?
bundle exec /Users/TTS/.rvm/rubies/ruby-1.9.2-p136/bin/ruby -S /Users/
TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.3.1/bin/rspec --tty '/
Users/TTS/Rails/sample_app/spec/controllers/pages_controller_spec.rb'
'/Users/TTS/Rails/sample_app/spec/controllers/
sessions_controller_spec.rb' '/Users/TTS/Rails/sample_app/spec/
controllers/users_controller_spec.rb' '/Users/TTS/Rails/sample_app/
spec/models/user_spec.rb' '/Users/TTS/Rails/sample_app/spec/requests/
layout_links_spec.rb' '/Users/TTS/Rails/sample_app/spec/requests/
users_spec.rb'
/Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/rspec/
core/option_parser.rb:18:in `parse!': invalid option: --tty
(OptionParser::InvalidOption)
from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/
rspec/core/option_parser.rb:4:in `parse!'
from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/
rspec/core/configuration_options.rb:64:in `parse_command_line_options'
from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/
rspec/core/configuration_options.rb:46:in `parse_options'
from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/
rspec/core/runner.rb:41:in `run'
from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/
rspec/core/runner.rb:10:in `block in autorun'
FWIW, my .autotest file is identical to yours, so that's not the problem. FWIW,我的.autotest文件与您的文件相同,所以这不是问题。 Can you verify what autotest gem you are running?
您可以验证正在运行的自动测试gem吗? (Mine is at 4.4.6 and is working fine.)
(我的电话是4.4.6,并且工作正常。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.