Skip to content

teigen/scalatest-junit4runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

scalatest-junit4runner is a JUnit4 Runner for ScalaTest

It lets you run ScalaTests from both Maven and your JUnit4 enabled IDE by annotating your tests as shown in the example below

Install


git clone git://github.com/teigen/scalatest-junit4runner.git
cd scalatest-junit4runner
mvn clean install

Add as a dependency



com.jteigen.scalatest
junit4runner
1.0-SNAPSHOT
test

Use


import com.jteigen.scalatest.JUnit4Runner
import org.junit.runner.RunWith
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.Spec

@RunWith(classOf[JUnit4Runner])
class SimpleTest extends Spec with ShouldMatchers {
describe(“Demo”){
it(“should run”){
1 + 1 should be (2)
}

ignore(“should ignore”){ 1 + 1 should be (3) // doesn’t fail as the test is ignored } it(“should crash and burn!”){ 1 + 1 should be (3) } }

}

About

JUnit4 Runner for ScalaTest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages