RSpec Error - "Invalid Option"

I keep getting an issue when running RSpec with Autotest. My
~/.autotest file looks like this:
==FILE BEGINS==
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
==FILE ENDS==
Any thoughts on what I’m doing wrong?
==ERROR BEGINS==
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:inparse!’
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:inparse_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:inblock in autorun’
==ERROR ENDS==

On Feb 15, 2011, at 11:43 PM, Trenton S. wrote:

I keep getting an issue when running RSpec with Autotest. My
~/.autotest file looks like this:

Any thoughts on what I’m doing wrong?
==ERROR BEGINS==
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
'/

^^ rspec-core-2.3.1 ^^

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

^^ rspec-core-2.0.1 ^^

See Gotchas section on
http://relishapp.com/rspec/rspec-core/v/2-5/file/autotest for an
explanation and solution.

Cheers,
David

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs