Sha256: c6627262716bc7755f0d57bd3e70b99f67a13e5315d9d48b6ac7b8d267377c0d

Contents?: true

Size: 988 Bytes

Versions: 16

Compression:

Stored size: 988 Bytes

Contents

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

module Wally
  describe ListsFeatures do
    before do
      FileUtils.mkdir_p "application-features"
    end

    after do
      FileUtils.rm_rf "application-features"
    end

    it "returns a list of alphabeticaly ordered features" do
      File.open("application-features/1-sample.feature", "w") do |file|
        file.write "Feature: Zorro"
      end
      File.open("application-features/2-sample.feature", "w") do |file|
        file.write "Feature: Malgor"
      end
      File.open("application-features/3-sample.feature", "w") do |file|
        file.write "Feature: Adrian"
      end
      lists_features = ListsFeatures.new("application-features")
      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

16 entries across 16 versions & 1 rubygems

Version Path
wally-0.0.19 spec/wally/lists_features_spec.rb
wally-0.0.18 spec/wally/lists_features_spec.rb
wally-0.0.17 spec/wally/lists_features_spec.rb
wally-0.0.16 spec/wally/lists_features_spec.rb
wally-0.0.15 spec/wally/lists_features_spec.rb
wally-0.0.14 spec/wally/lists_features_spec.rb
wally-0.0.13 spec/wally/lists_features_spec.rb
wally-0.0.12 spec/wally/lists_features_spec.rb
wally-0.0.11 spec/wally/lists_features_spec.rb
wally-0.0.10 spec/wally/lists_features_spec.rb
wally-0.0.9 spec/wally/lists_features_spec.rb
wally-0.0.8 spec/wally/lists_features_spec.rb
wally-0.0.7 spec/wally/lists_features_spec.rb
wally-0.0.6 spec/wally/lists_features_spec.rb
wally-0.0.5 spec/wally/lists_features_spec.rb
wally-0.0.3 spec/wally/lists_features_spec.rb