Sha256: b44d1ceba75a36ac49f9335d53959227b2bd5deb794cfee23d7048217d516a36

Contents?: true

Size: 749 Bytes

Versions: 17

Compression:

Stored size: 749 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
  include_examples 'skips non-strings'
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
krikri-0.7.6 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.7.5 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.7.4 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.7.3 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.7.2 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.7.1 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.7.0 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.6.0 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.7 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.6 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.5 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.4 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.3 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.2 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.1 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.5.0 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb
krikri-0.4.0 spec/lib/krikri/enrichments/remove_empty_fields_spec.rb