<commit_before>require "rake-pipeline-web-filters/helpers"

describe "Helpers" do

  let(:pipeline) { Rake::Pipeline.new }
  let(:dsl) { Rake::Pipeline::DSL.new(pipeline) }

  before do
    pipeline.input_roots << ["."]
  end

  def filter
    pipeline.filters.last
  end

  describe "#concat" do
    it "creates a ConcatFilter" do
      dsl.concat "octopus"
      filter.should be_kind_of(Rake::Pipeline::ConcatFilter)
   end

    context "passed an Array first argument" do
      it "creates an OrderingConcatFilter" do
        dsl.concat ["octopus"]
        filter.should be_kind_of(Rake::Pipeline::Web::Filters::OrderingConcatFilter)
     end
    end
  end

  describe "#minispade" do
    it "creates a MinispadeFilter" do<commit_msg>HelpersSpec: Pipeline#input_roots changed to #add_input<commit_after>require "rake-pipeline-web-filters/helpers"

describe "Helpers" do

  let(:pipeline) { Rake::Pipeline.new }
  let(:dsl) { Rake::Pipeline::DSL.new(pipeline) }

  before do
    pipeline.add_input '.'
  end

  def filter
    pipeline.filters.last
  end

  describe "#concat" do
    it "creates a ConcatFilter" do
      dsl.concat "octopus"
      filter.should be_kind_of(Rake::Pipeline::ConcatFilter)
   end

    context "passed an Array first argument" do
      it "creates an OrderingConcatFilter" do
        dsl.concat ["octopus"]
        filter.should be_kind_of(Rake::Pipeline::Web::Filters::OrderingConcatFilter)
     end
    end
  end

  describe "#minispade" do
    it "creates a MinispadeFilter" do
{'fraction_non_alphanumeric': 0.10655195234943746, 'fraction_numerical': 0.0, 'mean_word_length': 3.473372781065089, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6052110', 'n_tokens_mistral': 510, 'n_tokens_neox': 505, 'n_words': 117}