Sha256: fa65e0a5a417c5059ab4e776904a9c15a0a1959da75ec28732349692c3ef8076

Contents?: true

Size: 1.08 KB

Versions: 25

Compression:

Stored size: 1.08 KB

Contents

require 'rake'
require 'spec_helper'
require 'speckle/list/builder'
require 'speckle/list/absolute_path_transformer'
require 'speckle/list/dir_expander'
require 'speckle/list/extension_transformer'
require 'speckle/list/file_content_filter'
require 'speckle/list/pattern_filter'
require 'securerandom'

module Speckle
  module List

    describe 'Builder' do

      before :each do 
        @builder = Builder.new
      end

      it 'can be built' do
        expect(@builder).to respond_to(:build)
      end

      it 'can build list of source files from directory', :a => true do
        builder = Builder.new
        builder.add_source 'spec'
        builder.add_filter DirExpander.new('**/*_spec.riml')
        builder.add_filter FileContentFilter.new('class', false)
        builder.add_filter PatternFilter.new('matcher')
        builder.add_filter AbsolutePathTransformer.new
        builder.add_filter ExtensionTransformer.new('riml')

        result = builder.build
        result.each do |f|
          expect(File.exists?(f)).to be_true
        end
        #puts result
      end

    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
speckle-0.1.12 spec/speckle/list/builder_spec.rb
speckle-0.1.11 spec/speckle/list/builder_spec.rb
speckle-0.1.10 spec/speckle/list/builder_spec.rb
speckle-0.1.9 spec/speckle/list/builder_spec.rb
speckle-0.1.8 spec/speckle/list/builder_spec.rb