Sha256: 256fe575b19bc58486a9707a8e77382dd340658fbdbecca96bed18a87bbb3d14

Contents?: true

Size: 626 Bytes

Versions: 8

Compression:

Stored size: 626 Bytes

Contents

require 'spec_helper'

module Prosperity
  describe MetricFinder do
    subject { MetricFinder.new File.join(TEST_FILES, "metrics") }

    describe "#metrics" do
      let(:metrics) { subject.metrics }

      it "returns an array" do
        metrics.should be_an(Array)
      end

      it "should contain at least one metric" do
        metrics.size.should be > 0
        metrics.first.superclass.should == Metric
      end
    end

    describe ".find_by_name" do
      it "finds a metric by name" do
        metric = described_class.find_by_name('UsersMetric')
        metric.should be < Metric
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
prosperity-0.0.9 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.8 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.7 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.6 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.5 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.4 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.3 spec/lib/prosperity/metric_finder_spec.rb
prosperity-0.0.2 spec/lib/prosperity/metric_finder_spec.rb