Sha256: 39f0a2ee6bb884de2ac77f263fac076e76386069945e420dbf0ca41d829a3349

Contents?: true

Size: 597 Bytes

Versions: 2

Compression:

Stored size: 597 Bytes

Contents

require 'cql/filters'


module CQL

  class SsoLineCountFilter < TypeCountFilter

    def type_count(test)
      test.steps.size
    end

  end

  class LineFilter < ContentMatchFilter

    def execute(input, negate)
      method_for_filtering = negate ? :reject : :select
      method_for_text = Gem.loaded_specs['cuke_modeler'].version.version[/^0/] ? :base : :text

      input.send(method_for_filtering) do |tests|
        raw_step_lines = tests.steps.map { |step| step.send(method_for_text) }

        content_match?(raw_step_lines)
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cql-1.4.0 lib/cql/sso_filters.rb
cql-1.3.0 lib/cql/sso_filters.rb