class Rcodetools::XMPRSpecFilter

Public Class Methods

new(x={}) click to toggle source
Calls superclass method Rcodetools::XMPTestUnitFilter.new
# File lib/rcodetools/xmptestunitfilter.rb, line 123
def initialize(x={})
  super(x.merge(:_no_extend_module => true))
  load_rspec
  specver = (Spec::VERSION::STRING rescue "1.0.0")
  api_module = specver >= "0.8.0" ? NewAPI : OldAPI
  mod = @parentheses ? :WithParentheses : :Poetry
  extend api_module.const_get(mod) 
  extend api_module
end

Private Instance Methods

interpreter_command() click to toggle source
# File lib/rcodetools/xmptestunitfilter.rb, line 148
def interpreter_command
  [@interpreter] + @libs.map{|x| "-r#{x}"}
end
load_rspec() click to toggle source
# File lib/rcodetools/xmptestunitfilter.rb, line 134
def load_rspec
  begin
    require 'spec/version'
  rescue LoadError
    require 'rubygems'
    begin
      require 'spec/version'
    rescue LoadError # if rspec isn't available, use most recent conventions
    end
  end
end