Implemented get and set environment variables for posix.

This commit is contained in:
Adam Murdoch
2013-02-16 11:15:05 +11:00
parent 01c4f26e97
commit fc23941f5c
7 changed files with 156 additions and 32 deletions

View File

@@ -19,6 +19,7 @@ package net.rubygrapefruit.platform
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import spock.lang.Specification
import spock.lang.Unroll
class ProcessTest extends Specification {
@Rule TemporaryFolder tmpDir
@@ -36,6 +37,7 @@ class ProcessTest extends Specification {
def "can get and change working directory"() {
def newDir = tmpDir.newFolder(dir).canonicalFile
assert newDir.directory
when:
def original = process.workingDirectory
@@ -67,7 +69,7 @@ class ProcessTest extends Specification {
then:
NativeException e = thrown()
e.message.startsWith("Could not set process working directory:")
e.message.startsWith("Could not set process working directory")
}
def "can get and set and remove environment variable"() {