Sha256: 89b682ac03f5325b05ab0fd28e739713e1e3029474e56c68b6748e724571885f

Contents?: true

Size: 848 Bytes

Versions: 6

Compression:

Stored size: 848 Bytes

Contents

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

module Wally
  describe ListsFeatures do
    after do
      Feature.delete_all
    end

    def create_feature path, content
      feature = Feature.new
      feature.path = path
      feature.content = content
      feature.save
    end

    it "returns a list of alphabeticaly ordered features" do
      create_feature("1-sample.feature", "Feature: Zorro")
      create_feature("2-sample.feature", "Feature: Malgor")
      create_feature("3-sample.feature", "Feature: Adrian")
      lists_features = ListsFeatures.new
      lists_features.features.size.should == 3
      lists_features.features[0]["name"].should == "Adrian"
      lists_features.features[1]["name"].should == "Malgor"
      lists_features.features[2]["name"].should == "Zorro"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wally-0.0.28 spec/wally/lists_features_spec.rb
wally-0.0.27 spec/wally/lists_features_spec.rb
wally-0.0.26 spec/wally/lists_features_spec.rb
wally-0.0.25 spec/wally/lists_features_spec.rb
wally-0.0.24 spec/wally/lists_features_spec.rb
wally-0.0.22 spec/wally/lists_features_spec.rb