Sha256: 2d1a75f76dc30a604681276c78f57b6f9244793cea3afc697bb941af4e24ee33

Contents?: true

Size: 520 Bytes

Versions: 44

Compression:

Stored size: 520 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

44 entries across 44 versions & 1 rubygems

Version Path
mutant-0.8.0 spec/support/rspec.rb
mutant-0.7.9 spec/support/rspec.rb
mutant-0.7.8 spec/support/rspec.rb
mutant-0.7.7 spec/support/rspec.rb
mutant-0.7.6 spec/support/rspec.rb
mutant-0.7.5 spec/support/rspec.rb
mutant-0.7.4 spec/support/rspec.rb
mutant-0.7.3 spec/support/rspec.rb
mutant-0.7.2 spec/support/rspec.rb
mutant-0.7.1 spec/support/rspec.rb
mutant-0.6.7 spec/support/rspec.rb
mutant-0.6.6 spec/support/rspec.rb
mutant-0.6.5 spec/support/rspec.rb
mutant-0.6.4 spec/support/rspec.rb
mutant-0.6.3 spec/support/rspec.rb
mutant-0.6.2 spec/support/rspec.rb
mutant-0.6.0 spec/support/rspec.rb
mutant-0.5.26 spec/support/rspec.rb
mutant-0.5.25 spec/support/rspec.rb
mutant-0.5.24 spec/support/rspec.rb