Sha256: e3bf1aab0727774c871bf2db46f4822dda7aecaf93229f382f3f517fef02da16

Contents?: true

Size: 710 Bytes

Versions: 9

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'

describe Krikri::Enrichments::RemoveEmptyFields do
  it_behaves_like 'a field enrichment'

  values = [{ :string => 'removes empty fields',
              :start => '',
              :end => nil
            },
            { :string => 'removes whitespace only fields',
              :start => '   ',
              :end => nil
            },
            { :string => 'removes whitespace only fields with newlines',
              :start => "\n\t  \t\n",
              :end => nil
            },
            { :string => 'leaves non-empty fields unaltered',
              :start => 'moomin',
              :end => 'moomin'
            }]

  it_behaves_like 'a string enrichment', values
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
krikri-0.3.3 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.3.2 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.3.1 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.2.1 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.2.0 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.1.3 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.1.2 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.1.1 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.1.0 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb