Skip to content

Commit

Permalink
#66 removed Jetty from even test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
robfletcher committed Oct 28, 2013
1 parent 1302adc commit be17d1b
Show file tree
Hide file tree
Showing 39 changed files with 741 additions and 1,035 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import co.freeside.betamax.handler.*
import co.freeside.betamax.junit.Betamax
import co.freeside.betamax.junit.RecorderRule
import co.freeside.betamax.message.Response
import co.freeside.betamax.proxy.jetty.SimpleServer
import co.freeside.betamax.util.server.SimpleServer
import co.freeside.betamax.util.message.BasicRequest
import co.freeside.betamax.util.server.IncrementingHandler
import org.junit.Rule
Expand All @@ -38,11 +38,11 @@ class SequentialTapeWritingSpec extends Specification {
@Shared @AutoCleanup('deleteDir') def tapeRoot = newTempDir('tapes')
def recorder = new Recorder(tapeRoot: tapeRoot)
@Rule RecorderRule recorderRule = new RecorderRule(recorder)
@Shared @AutoCleanup('stop') def endpoint = new SimpleServer()
@Shared @AutoCleanup('stop') def endpoint = new SimpleServer(IncrementingHandler)
def handler = new DefaultHandlerChain(recorder)

void setupSpec() {
endpoint.start(IncrementingHandler)
endpoint.start()
}

@Betamax(tape = 'sequential tape', mode = WRITE_SEQUENTIAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ package co.freeside.betamax.recorder
import co.freeside.betamax.Recorder
import co.freeside.betamax.handler.*
import co.freeside.betamax.message.Request
import co.freeside.betamax.proxy.jetty.SimpleServer
import co.freeside.betamax.util.server.HelloHandler
import co.freeside.betamax.util.server.SimpleServer
import co.freeside.betamax.util.message.BasicRequest
import co.freeside.betamax.util.server.EchoHandler
import spock.lang.*
Expand All @@ -32,12 +33,12 @@ class TapeModeSpec extends Specification {

@Shared @AutoCleanup('deleteDir') File tapeRoot = newTempDir('tapes')
@Shared Recorder recorder = new Recorder(tapeRoot: tapeRoot)
@Shared @AutoCleanup('stop') SimpleServer endpoint = new SimpleServer()
@Shared @AutoCleanup('stop') SimpleServer endpoint = new SimpleServer(HelloHandler)
HttpHandler handler = new DefaultHandlerChain(recorder)
Request request = new BasicRequest('GET', endpoint.url)

void setupSpec() {
endpoint.start(EchoHandler)
endpoint.start()
}

void cleanup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ package co.freeside.betamax.tape

import java.util.concurrent.CountDownLatch
import co.freeside.betamax.*
import co.freeside.betamax.handler.*
import co.freeside.betamax.junit.Betamax
import co.freeside.betamax.junit.RecorderRule
import co.freeside.betamax.proxy.jetty.SimpleServer
import co.freeside.betamax.handler.DefaultHandlerChain
import co.freeside.betamax.junit.*
import co.freeside.betamax.util.message.BasicRequest
import co.freeside.betamax.util.server.HelloHandler
import co.freeside.betamax.util.server.*
import org.junit.Rule
import spock.lang.*
import static co.freeside.betamax.util.FileUtils.newTempDir
Expand All @@ -37,10 +35,10 @@ class MultiThreadedTapeWritingSpec extends Specification {
@Rule RecorderRule recorderRule = new RecorderRule(recorder)
def handler = new DefaultHandlerChain(recorder)

@Shared @AutoCleanup('stop') SimpleServer endpoint = new SimpleServer()
@Shared @AutoCleanup('stop') SimpleServer endpoint = new SimpleServer(HelloHandler)

void setupSpec() {
endpoint.start(HelloHandler)
endpoint.start()
}

@Betamax(tape = 'multi_threaded_tape_writing_spec', mode = TapeMode.READ_WRITE)
Expand Down
Loading

0 comments on commit be17d1b

Please sign in to comment.