Sha256: ede2ee190a1116689e6d55979ac605d942f6339d66c957b7ff5d360b1eb0789f

Contents?: true

Size: 869 Bytes

Versions: 6

Compression:

Stored size: 869 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

describe SdocAll::FileList do
  before do
    @list = SdocAll::FileList.new
  end

  it "should include well" do
    @list.include('R*')
    @list.should == %w(Rakefile README.rdoc)
  end

  it "should exclude well" do
    @list.include('R*')
    @list.exclude('Rake*')
    @list.should == %w(README.rdoc)
  end

  it "should exclude non existing files from list" do
    @list.include('R*')
    @list.include('non existing')
    @list.should == %w(Rakefile README.rdoc)
  end

  it "should exclude duplicates" do
    @list.include('R*')
    @list.include('R*')
    @list.should == %w(Rakefile README.rdoc)
  end

  it "should not fail if directory changes after resolve" do
    @list.include('R*')
    @list.resolve
    Dir.original_chdir('lib') do
      @list.should == %w(Rakefile README.rdoc)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sdoc_all-1.3.3 spec/sdoc_all/file_list_spec.rb
sdoc_all-1.3.2 spec/sdoc_all/file_list_spec.rb
sdoc_all-1.3.1 spec/sdoc_all/file_list_spec.rb
sdoc_all-1.0.7 spec/sdoc_all/file_list_spec.rb
sdoc_all-1.0.6 spec/sdoc_all/file_list_spec.rb
sdoc_all-1.0.5 spec/sdoc_all/file_list_spec.rb