[rspec-users] Propagating settings to subtyped ExampleGroups

Justin Ko jko170 at gmail.com
Tue Sep 14 01:04:43 EDT 2010

describe 'I want this to be inherited' do
  before do
    RSpec.configure {|c| c.use_transactional_fixtures = false }

  context 'blah' do

I would wrap it in a method if you're doing it often.

On Sep 14, 12:31 am, Brian Takita <brian.tak... at gmail.com> wrote:
> Hey, rspec 2 upgrade question.
> Rspec 1.x had a class hierarchy. In a Rails project, the ExampleGroup
> inherited from Test::Unit::TestCase.
> That allowed me to set use_transactional_fixtures in my own
> ExampleGroups and rely on inheritance for the settings to propagate.
> Now it seems like RSpec::Core::ExampleGroup no longer inherits from
> Test::Unit::TestCase and there is RSpec.configure instead.
> How do I have the settings in the configuration propagate to subtypes
> of the ExampleGroup?
> Thanks,
> Brian
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list