Forum: RSpec Configuring RSpec 2

Posted by Kristian Mandrup (Guest)
on 2010-03-02 14:48
(Received via mailing list)
# 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 :)
Posted by David Chelimsky (Guest)
on 2010-03-02 15:02
(Received via mailing list)
On Tue, Mar 2, 2010 at 7:42 AM, Kristian Mandrup <kmandrup@gmail.com> 
wrote:
> 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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.