Sha256: cd692f1e0895defc9bdca5407d4717fd2d47e51ee4984741c0edbc9b7b2f6521

Contents?: true

Size: 565 Bytes

Versions: 13

Compression:

Stored size: 565 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'json'

describe Wikipedia::Page, '.sanitize wiki markup' do
  Dir[File.dirname(__FILE__) + '/../fixtures/sanitization_samples/*-raw.txt'].each do |raw_filename|
    name = raw_filename.sub(/\/(.+?)\-raw\.txt$/, '\1')
    sanitized_filename = raw_filename.sub('-raw', '-sanitized')
    it "should sanitize #{name} properly" do
      @raw = File.read(raw_filename)
      @sanitized = File.read(sanitized_filename).strip
      expect(Wikipedia::Page.sanitize(@raw).strip).to eq(@sanitized)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
wikipedia-client-1.17.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.16.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.15.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.14.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.13.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.12.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.11.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.10.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.9.1 spec/lib/sanitize_spec.rb
wikipedia-client-1.9.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.8.0 spec/lib/sanitize_spec.rb
wikipedia-client-1.7.1 spec/lib/sanitize_spec.rb
wikipedia-client-1.7.0 spec/lib/sanitize_spec.rb