Sha256: 61242ee60a1672cb16d95081dbf69931ef7396bc61cad0717b2735a88e0bfa89

Contents?: true

Size: 673 Bytes

Versions: 1

Compression:

Stored size: 673 Bytes

Contents

$:.unshift(File.dirname(__FILE__)) unless
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

require 'cucumber'
require 'cucumber/feature_file'
require 'cucumber/formatter/html'

module Courgette
  VERSION = '0.0.3'
  
  autoload :Feature, 'courgette/feature'
  
  class << self
    def features
      Dir.glob(File.join(feature_root, '**/*.feature')).map do |file|
        Courgette::Feature.new(file)
      end
    end
    
    def first
      features.first
    end
    
    def find(param)
      features.find { |f| f.to_param == param }
    end

    def feature_root
      Rails.root.join('features').to_s
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jnicklas-courgette-0.0.3 lib/courgette.rb