Sha256: 818f4fa28051d96e0030716e4fdfab577416c3421db1fbce7499400a373b4019

Contents?: true

Size: 521 Bytes

Versions: 18

Compression:

Stored size: 521 Bytes

Contents

# Patch rspec to allow nested execution
module Rspec
  # Run block in clean rspec environment
  #
  # @return [Object]
  #   returns the value of block
  #
  # @api private
  #
  def self.nest
    original_world, original_configuration = 
      ::RSpec.instance_variable_get(:@world),
      ::RSpec.instance_variable_get(:@configuration)

    ::RSpec.reset

    yield
  ensure
    ::RSpec.instance_variable_set(:@world, original_world)
    ::RSpec.instance_variable_set(:@configuration, original_configuration)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mutant-0.2.20 spec/support/rspec.rb
mutant-0.2.17 spec/support/rspec.rb
mutant-0.2.16 spec/support/rspec.rb
mutant-0.2.15 spec/support/rspec.rb
mutant-0.2.14 spec/support/rspec.rb
mutant-0.2.13 spec/support/rspec.rb
mutant-0.2.12 spec/support/rspec.rb
mutant-0.2.11 spec/support/rspec.rb
mutant-0.2.9 spec/support/rspec.rb
mutant-0.2.8 spec/support/rspec.rb
mutant-0.2.7 spec/support/rspec.rb
mutant-0.2.6 spec/support/rspec.rb
mutant-0.2.5 spec/support/rspec.rb
mutant-0.2.4 spec/support/rspec.rb
mutant-0.2.3 spec/support/rspec.rb
mutant-0.2.2 spec/support/rspec.rb
mutant-0.2.1 spec/support/rspec.rb
mutant-0.2.0 spec/support/rspec.rb