lib/buildr/java/bdd.rb in vic-buildr-1.3.3 vs lib/buildr/java/bdd.rb in vic-buildr-1.3.4
- old
+ new
@@ -11,13 +11,15 @@
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
+
require 'buildr/java/tests'
require 'buildr/java/test_result'
+
module Buildr
# Mixin for test frameworks using src/spec/{lang}
class TestFramework::JavaBDD < TestFramework::Java #:nodoc:
@@ -44,11 +46,11 @@
end
module TestFramework::JRubyBased
extend self
- VERSION = '1.1.4'
+ VERSION = '1.1.3'
class << self
def version
Buildr.settings.build['jruby'] || VERSION
end
@@ -267,12 +269,13 @@
parser.order!(argv)
$rspec_options = parser.options
Buildr::TestFramework::TestResult::Error.guard('<%= runner.file %>') do
::Spec::Runner::CommandLine.run($rspec_options)
end
+ exit 0 # let buildr figure the result from the yaml file
}
- Filter::Mapper.new(:erb, binding).result(runner_erb)
+ Filter::Mapper.new(:erb, binding).transform(runner_erb)
end
end
# <a href="http://jtestr.codehaus.org/">JtestR</a> is a framework for BDD and TDD using JRuby and ruby tools.
@@ -363,17 +366,18 @@
tests.values.flatten
end
def runner_config
runner = super
- runner.gems.update 'rspec' => '>0'
- runner.requires.unshift 'spec', 'jtestr'
+ # JtestR 0.3.1 comes with rspec 1.1.4 (and any other jtestr dependency) included,
+ # so the rspec version used depends on the jtestr jar.
+ runner.requires.unshift 'jtestr'
runner
end
def runner_content(binding)
runner_erb = File.join(File.dirname(__FILE__), 'jtestr_runner.rb.erb')
- Filter::Mapper.new(:erb, binding).result(File.read(runner_erb), runner_erb)
+ Filter::Mapper.new(:erb, binding).transform(File.read(runner_erb), runner_erb)
end
end