Sha256: 9ec78049ffd757385a5c214c1e5f1f616ed70559d2121af509c7e26378fb92fb
Contents?: true
Size: 846 Bytes
Versions: 14
Compression:
Stored size: 846 Bytes
Contents
require "isolate/test" require "isolate" class TestIsolate < Isolate::Test WITH_HOE = "test/fixtures/with-hoe" def teardown Isolate.sandbox.disable if Isolate.sandbox super end def test_self_env assert_equal "development", Isolate.env ENV["RAILS_ENV"] = "foo" assert_equal "foo", Isolate.env ENV["RAILS_ENV"] = nil ENV["RACK_ENV"] = "bar" assert_equal "bar", Isolate.env ENV["RACK_ENV"] = nil ENV["ISOLATE_ENV"] = "baz" assert_equal "baz", Isolate.env end def test_self_now! assert_nil Isolate.sandbox Isolate.now! :path => WITH_HOE, :multiruby => false, :system => false do gem "hoe" end refute_nil Isolate.sandbox assert_equal File.expand_path(WITH_HOE), Isolate.sandbox.path assert_equal "hoe", Isolate.sandbox.entries.first.name end end
Version data entries
14 entries across 14 versions & 1 rubygems