module Minitest

Public Class Methods

plugin_jsonapi_init(options) click to toggle source
# File lib/minitest/jsonapi_plugin.rb, line 123
def self.plugin_jsonapi_init(options)
        if JsonApi.enabled?
                reporter.reporters << JsonApi::Reporter.new(options)
        end
end
plugin_jsonapi_options(opts, options) click to toggle source
# File lib/minitest/jsonapi_plugin.rb, line 129
def self.plugin_jsonapi_options(opts, options)
        description = "Generate JSON to send"
        opts.on "-J", "--json", description do
                JsonApi.enable!
        end

        opts.on "--pretty", 'pretty print (for terminal output)' do
                options[:pretty] = true
        end

        opts.on "--addr [OPTIONAL]", String, "Full URL to send JSON to (http/https) .e.g https://api.com/test/results" do |url|
                options[:addr] = url
        end
        opts.on "--keyname [OPTIONAL]", String, "API Key Name" do |apikeyname|
                options[:apikeyname] = apikeyname
        end
        opts.on "--keyvalue [OPTIONAL]", String, "API Key Value" do |apikeyvalue|
                options[:apikeyvalue] = apikeyvalue
        end
end