Spec.opts is deprecated - Using options file with RSpec 2

Using RSpec 2 beta.

$ rspec spec

  • spec/spec.opts is deprecated.
  • please use .rspec or ~/.rspec instead.

I tried renaming the file to .rspec but then it has no effect!

spec/.rspec

–format nested
–color

It works if I copy it to ~/.rspec and it turns out, also if I
copy .rspec to the root of my application :wink:

On Jun 5, 2010, at 3:08 PM, Kristian M. wrote:

–format nested
–color

It works if I copy it to ~/.rspec and it turns out, also if I
copy .rspec to the root of my application :wink:

That’s what “.rspec” means. I’ll change it to ./.rspec to make that more
clear.

Thanks :wink:

I also tried to follow the instructions on using autospec/autotest,
first from the RSpec book then from instructions found on the net.

I managed to do the following so far:

config/cucumber.yml

default: --format profile features
html_report: --format progress --format html –
out=features_report.html features

User specific

~/.autotest

require ‘autotest/fsevent’
require ‘autotest/growl’

Skip some paths

Autotest.add_hook :initialize do |autotest|
%w{.git .DS_Store ._* vendor}.each { |exception|
autotest.add_exception(exception) }
false
end

Project specific
/.autotest
Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^.git} # ignore Version Control System
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will
run again, and again…

at.clear_mappings # take out the default (test/test*rb)

at.add_mapping(%r{^lib/..rb$}) {|f, _|
Dir['spec/**/
.rb’]
}
nil
}

$ autotest
loading autotest/cucumber
style: Cucumber

Using the default profile…

But now it only outputs Cucumber feature results.

How do I instruct it to ignore Cucumber for the time being and report
only on my RSpec 2 specs in my spec dir?

Thanks!

On Jun 5, 2010, at 3:12 PM, David C. wrote:

spec/.rspec

–format nested
–color

It works if I copy it to ~/.rspec and it turns out, also if I
copy .rspec to the root of my application :wink:

That’s what “.rspec” means. I’ll change it to ./.rspec to make that more clear.