Sha256: c03df164f858ce544eec4d4b726fe710ce57d53879ef0d6b222985c589d6ba40

Contents?: true

Size: 848 Bytes

Versions: 1

Compression:

Stored size: 848 Bytes

Contents

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

describe Courgette::Feature do
  
  before do
    @feature = Courgette::Feature.new(Rails.root.join('features/user_eats_rabbits.feature').to_s)
  end
  
  describe '#name' do
    it "should return the feature's name" do
      @feature.name.should == "User eats a Rabbit"
    end
  end
  
  describe '#feature_elements_size' do
    it "should return the number of scenarios" do
      @feature.feature_elements_size.should == 2
    end
  end
  
  describe '#to_param' do
    it "should return the feature's path, relative to feature_root, parameterized and without extension" do
      @feature.to_param.should == 'user-eats-rabbits'
    end
  end
  
  describe '#to_html' do
    it "should not raise any errors" do
      lambda { @feature.to_html }.should_not raise_error
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

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