Sha256: d41f1b6e90c4fbd960396c0bb4e0f7aed339d34b9531b549e798b7267f286b91

Contents?: true

Size: 539 Bytes

Versions: 33

Compression:

Stored size: 539 Bytes

Contents

# encoding: utf-8

# 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

33 entries across 33 versions & 1 rubygems

Version Path
mutant-0.5.19 spec/support/rspec.rb
mutant-0.5.18 spec/support/rspec.rb
mutant-0.5.17 spec/support/rspec.rb
mutant-0.5.16 spec/support/rspec.rb
mutant-0.5.15 spec/support/rspec.rb
mutant-0.5.14 spec/support/rspec.rb
mutant-0.5.13 spec/support/rspec.rb
mutant-0.5.12 spec/support/rspec.rb
mutant-0.5.11 spec/support/rspec.rb
mutant-0.5.10 spec/support/rspec.rb
mutant-0.5.9 spec/support/rspec.rb
mutant-0.5.8 spec/support/rspec.rb
mutant-0.5.7 spec/support/rspec.rb
mutant-0.5.6 spec/support/rspec.rb
mutant-0.5.5 spec/support/rspec.rb
mutant-0.5.4 spec/support/rspec.rb
mutant-0.5.3 spec/support/rspec.rb
mutant-0.5.2 spec/support/rspec.rb
mutant-0.5.1 spec/support/rspec.rb
mutant-0.5.0 spec/support/rspec.rb