Sha256: 25a561a8dc075c405eb2b0eb9cad0a7980b2ea939adbe1aa12c648249fcfa65d

Contents?: true

Size: 939 Bytes

Versions: 1

Compression:

Stored size: 939 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper')

describe Courgette do
  
  describe '.features' do
    it "should return a list of Courgette::Feature objects" do
      Courgette.features.first.should be_an_instance_of(Courgette::Feature)
      Courgette.features.second.should be_an_instance_of(Courgette::Feature)
    end
    
    it "should glob the path for feature files and get them by path" do
      Courgette.features.map(&:path).should include(Rails.root.join('features/user_eats_rabbits.feature').to_s)
      Courgette.features.map(&:path).should include(Rails.root.join('features/visitor_transforms.feature').to_s)
    end
  end
  
  describe '.find' do
    it "should find a feature by param" do
      @feature = Courgette.find('user-eats-rabbits')
      @feature.should be_an_instance_of(Courgette::Feature)
      @feature.path.should == Rails.root.join('features/user_eats_rabbits.feature').to_s
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jnicklas-courgette-0.0.2 spec/courgette_spec.rb