Sha256: b0b892a139fb7c159941531ae933df08aed38f0e5ab475aee4b4b40bda6cb084
Contents?: true
Size: 1.76 KB
Versions: 13
Compression:
Stored size: 1.76 KB
Contents
# Copyright (c) 2012- RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and the licensee. # Cucumber naïvely requires JUST this file without necessarily requiring # RightSupport's main file. Make up for Cucumber's shortcomings. require 'right_support' module RightSupport::CI if require_succeeds?('cucumber/formatter/junit') class JavaCucumberFormatter < Cucumber::Formatter::Junit private def build_testcase(duration, status, exception = nil, suffix = "") @time += duration # Use "cucumber" as a pseudo-package, and the feature name as a pseudo-class classname = "cucumber.#{@feature_name}" name = "#{@scenario}#{suffix}" pending = [:pending, :undefined].include?(status) passed = (status == :passed || (pending && !@options[:strict])) @builder.testcase(:classname => classname, :name => name, :time => "%.6f" % duration) do unless passed @builder.failure(:message => "#{status.to_s} #{name}", :type => status.to_s) do @builder.cdata! @output @builder.cdata!(format_exception(exception)) if exception end @failures += 1 end if passed and (status == :skipped || pending) @builder.skipped @skipped += 1 end end @tests += 1 end end end end
Version data entries
13 entries across 13 versions & 1 rubygems