Permalink
Browse files

Adicionando specs 2 no projeto, testes+=1

  • Loading branch information...
narcisobenigno committed Mar 16, 2012
1 parent 9424df8 commit ae8182ec45db30130278383423046cb99a9fbadd
Showing with 26 additions and 3 deletions.
  1. +6 −3 build.gradle
  2. +20 −0 src/test/scala/net/vidageek/games/auth/AuthorizationVerifierTest.scala
View
@@ -39,6 +39,8 @@ sourceSets {
eclipse.classpath.plusConfigurations += configurations.provided
+scalaVersion = '2.9.1-1'
+
dependencies {
compile 'org.prevayler:prevayler-factory:2.5'
compile 'com.thoughtworks.xstream:xstream:1.4.2'
@@ -54,15 +56,16 @@ dependencies {
compile 'com.google.inject:guice:3.0-rc2'
compile 'com.google.inject.extensions:guice-multibindings:3.0-rc2'
compile files(fileTree(dir: "$projectDir/lib" as File, includes: ['*.jar']))
- compile 'org.scala-lang:scala-library:2.9.1-1'
+ compile 'org.scala-lang:scala-library:' + scalaVersion
provided 'javax.servlet:servlet-api:2.5'
testCompile 'org.mockito:mockito-core:1.9.0'
testCompile 'junit:junit:4.10'
+ testCompile 'org.specs2:specs2_2.9.1:1.8.1'
- scalaTools 'org.scala-lang:scala-compiler:2.9.1-1'
- scalaTools 'org.scala-lang:scala-library:2.9.1-1'
+ scalaTools 'org.scala-lang:scala-compiler:' + scalaVersion
+ scalaTools 'org.scala-lang:scala-library:' + scalaVersion
}
[jettyRunWar, jettyRun]*.contextPath = '/'
@@ -0,0 +1,20 @@
+package net.vidageek.games.auth
+
+import org.junit.Test
+import org.specs2.mutable._
+import org.junit.runner.RunWith
+import org.specs2.runner.JUnitRunner
+
+@RunWith(classOf[JUnitRunner])
+class AuthorizationVerifierTest extends SpecificationWithJUnit{
+
+ "Authorization Verifier" should {
+ "authorize with valid verifier" in {
+ AuthorizationVerifier("validVerifier").authorized must beTrue
+ }
+ "Not authorize" in {
+ AuthorizationVerifier(null).authorized must beFalse
+ }
+ }
+
+}

0 comments on commit ae8182e

Please sign in to comment.