Module: Testspace::Rspec::Helpers

Defined in:
lib/testspace/rspec/helpers.rb

Instance Method Summary collapse

Instance Method Details

#testspace(metadata = nil, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/testspace/rspec/helpers.rb', line 3

def testspace( = nil, &block)
  options = {}
  if 
    from = ::Testspace::Rspec::Metadata.new().dir
    options = {}
    options[:from] = from if ::File.exist?(from)
  end
  space = ::Testspace::Space.new(options)
  space.enter do
    block.call space
  end
end