Sha256: 6a1226b596f95343f01da5516c28ddf6a73e4df2ecccc4d303db440c4725106e

Contents?: true

Size: 1.26 KB

Versions: 5

Compression:

Stored size: 1.26 KB

Contents

require File.expand_path(File.dirname(__FILE__)+"/spec_helper.rb")
  
describe Distribution::<%= distribution.capitalize %> do
    
  shared_examples_for "<%= distribution %> engine" do
    it "should return correct pdf" do
      if @engine.respond_to? :pdf
      else
        pending("No #{@engine}.pdf")
      end
    end
    
    it "should return correct cdf" do
      if @engine.respond_to? :cdf
      else
        pending("No #{@engine}.cdf")
      end
    end
  
    
    it "should return correct p_value" do
      if @engine.respond_to? :p_value
      else
        pending("No #{@engine}.cdf")
      end
    end
  end
  

  describe "singleton" do
    before do
      @engine=Distribution::<%= distribution.capitalize %>
    end
    it_should_behave_like "<%= distribution %> engine"
  end
  
  describe Distribution::<%= distribution.capitalize %>::Ruby_ do
    before do
      @engine=Distribution::<%= distribution.capitalize %>::Ruby_
    end
    it_should_behave_like "<%= distribution %> engine"
    
  end
  
  if Distribution.has_gsl?
    describe Distribution::<%= distribution.capitalize %>::GSL_ do
      before do
        @engine=Distribution::<%= distribution.capitalize %>::GSL_
      end
      it_should_behave_like "<%= distribution %> engine"
    end
  end
  
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
distribution-0.8.0 data/template/spec.erb
distribution-0.7.3 data/template/spec.erb
distribution-0.7.2 data/template/spec.erb
distribution-0.7.1 data/template/spec.erb
distribution-0.7.0 data/template/spec.erb