Sha256: ae9f6b16d37390e894acdaa8d4d562622c9a6bebf7403fa7df9352e661484ed8

Contents?: true

Size: 441 Bytes

Versions: 69

Compression:

Stored size: 441 Bytes

Contents

require 'nokogiri'
require 'recog/fingerprint'

describe Recog::Fingerprint do
  let(:xml) do
    path = File.expand_path(File.join('spec', 'data', 'whitespaced_fingerprint.xml'))
    doc = Nokogiri::XML(IO.read(path))
    doc.xpath("//fingerprint").first
  end
  subject { Recog::Fingerprint.new(xml) }

  describe "#name" do
    it "properly squashes whitespace" do
      expect(subject.name).to eq('I love whitespace!')
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
recog-2.1.23 spec/lib/recog/fingerprint_spec.rb
recog-2.1.22 spec/lib/recog/fingerprint_spec.rb
recog-2.1.21 spec/lib/recog/fingerprint_spec.rb
recog-2.1.20 spec/lib/recog/fingerprint_spec.rb
recog-2.1.19 spec/lib/recog/fingerprint_spec.rb
recog-2.1.18 spec/lib/recog/fingerprint_spec.rb
recog-2.1.17 spec/lib/recog/fingerprint_spec.rb
recog-2.1.16 spec/lib/recog/fingerprint_spec.rb
recog-2.1.15 spec/lib/recog/fingerprint_spec.rb
recog-2.1.14 spec/lib/recog/fingerprint_spec.rb
recog-2.1.13 spec/lib/recog/fingerprint_spec.rb
recog-2.1.12 spec/lib/recog/fingerprint_spec.rb
recog-2.1.11 spec/lib/recog/fingerprint_spec.rb
recog-2.1.10 spec/lib/recog/fingerprint_spec.rb
recog-2.1.9 spec/lib/recog/fingerprint_spec.rb
recog-2.1.8 spec/lib/recog/fingerprint_spec.rb
recog-2.1.7 spec/lib/recog/fingerprint_spec.rb
recog-2.1.6 spec/lib/recog/fingerprint_spec.rb
recog-2.1.5 spec/lib/recog/fingerprint_spec.rb
recog-2.1.4 spec/lib/recog/fingerprint_spec.rb