Sha256: 181bc247111ff52ad468ddffa3b8241c12977f6807b2ac884294d05bf48a8359

Contents?: true

Size: 339 Bytes

Versions: 13

Compression:

Stored size: 339 Bytes

Contents

module RSpecHelpers
  def relative_path(path)
    RSpec::Core::Metadata.relative_path(path)
  end

  def safely
    Thread.new do
      $SAFE = 3
      yield
    end.join

    # $SAFE is not supported on Rubinius
    unless defined?(Rubinius)
      expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
    end
  end

end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/spec/support/helper_methods.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/helper_methods.rb
sshp-0.0.1 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/helper_methods.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/helper_methods.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/spec/support/helper_methods.rb
vagrant-actionio-0.0.9 vendor/bundle/gems/rspec-core-2.13.0/spec/support/helper_methods.rb
rspec-core-2.13.1 spec/support/helper_methods.rb
rspec-core-2.13.0 spec/support/helper_methods.rb
remq-0.0.4 vendor/bundle/gems/rspec-core-2.12.2/spec/support/helper_methods.rb
remq-0.0.3 vendor/bundle/gems/rspec-core-2.12.2/spec/support/helper_methods.rb
rspec-core-2.12.2 spec/support/helper_methods.rb
rspec-core-2.12.1 spec/support/helper_methods.rb
rspec-core-2.12.0 spec/support/helper_methods.rb