Top Level Namespace

Defined Under Namespace

Modules: Kernel, OSX, Rucola Classes: Autotest, DependencyResolver, File, Object, String

Constant Summary collapse

RUBYCOCOA_ENV =
'release'
RUBYCOCOA_ROOT =

We are running in debug from xcode, which doesn’t set RUBYCOCOA_ROOT. Or we are simply running in release.

if RUBYCOCOA_ENV == 'release'
  Pathname.new(OSX::NSBundle.mainBundle.resourcePath.fileSystemRepresentation)
else
  Pathname.new(ENV['DYLD_LIBRARY_PATH'] + "../../../").cleanpath
end

Instance Method Summary collapse

Instance Method Details

#with_env(env) ⇒ Object

Sets the RUBYCOCOA_ENV for the duration of the block.



72
73
74
75
76
77
# File 'lib/rucola/test_helper.rb', line 72

def with_env(env)
  before = Rucola::RCApp.env
  Rucola::RCApp.stubs(:env).returns(env)
  yield
  Rucola::RCApp.stubs(:env).returns(before)
end