module Buildr::JMock

JMock is available when using JUnit and TestNG, JBehave.

Constants

VERSION

Public Class Methods

dependencies(versions = {:hamcrest => '1.1'}) click to toggle source
# File lib/buildr/java/tests.rb, line 99
def dependencies(versions = {:hamcrest => '1.1'})
  two_or_later = version[0,1].to_i >= 2
  group = two_or_later ? 'org.jmock' : 'jmock'

  @dependencies ||= ["#{group}:jmock:jar:#{version}"]
  if two_or_later
    @dependencies << "org.jmock:jmock-junit#{Buildr::JUnit.version.to_s[0,1]}:jar:#{version}"
    @dependencies << "org.hamcrest:hamcrest-core:jar:#{versions[:hamcrest]}"
    @dependencies << "org.hamcrest:hamcrest-library:jar:#{versions[:hamcrest]}"
  end
  @dependencies
end
version() click to toggle source
# File lib/buildr/java/tests.rb, line 95
def version
  Buildr.settings.build['jmock'] || VERSION
end