Sha256: f44d378f56bd52de92a9006c53d1a698e62f86e42a05a0922019e2924b61f426

Contents?: true

Size: 777 Bytes

Versions: 3

Compression:

Stored size: 777 Bytes

Contents

def metric_not_activated?(metric_name)
  MetricFu.configuration.configure_metrics
  if MetricFu::Metric.get_metric(metric_name.intern).activated
    false
  else
    p "Skipping #{metric_name} tests, not activated"
    true
  end
end

def breaks_when?(bool)
  p "Skipping tests in #{caller[0]}. They unnecessarily break the build." if bool
  bool
end

def read_resource(path_in_resources)
  File.read("#{resources_path}/#{path_in_resources}")
end

def metric_data(path_in_resources)
  metric_path = read_resource("yml/#{path_in_resources}")
  YAML.load( metric_path )
end

def resources_path
  "#{MetricFu.root_dir}/spec/resources"
  # directory(name)
end

def compare_paths(path1, path2)
  File.join(MetricFu.root_dir, path1).should == File.join(MetricFu.root_dir, path2)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
metric_fu-4.4.4 spec/support/helper_methods.rb
metric_fu-4.4.3 spec/support/helper_methods.rb
metric_fu-4.4.2 spec/support/helper_methods.rb