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