[rspec-users] Configuring RSpec 2

David Chelimsky dchelimsky at gmail.com
Tue Mar 2 08:59:25 EST 2010


On Tue, Mar 2, 2010 at 7:42 AM, Kristian Mandrup <kmandrup at gmail.com> wrote:
> # spec_helper.rb
>
> $LOAD_PATH.unshift(File.dirname(__FILE__))
> $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
> require '...
> require 'rspec'
> require 'rspec/autorun'
>
> # doesn't work: just remove it and it works.
> # But how would you configure the RSpec Runner in RSpec 2 then?
> Rspec::Runner.configure do |config|
>  # config here
> end
>
> Then I found this:
>
> Rspec::Core.configure do |c|
>  # config here
> end
>
> Which works :)

And is deprecated :) Use this:

Rspec.configure do |c|
  # config here
end


More information about the rspec-users mailing list