Sha256: 5313f9c81b626d5cacca08a88f5b54225c43f165fa9e3e4a1797b5bafe01d3fb
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 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 Wikipedia::Page.sanitize(@raw).strip.should == @sanitized end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wikipedia-client-1.6.4 | spec/lib/sanitize_spec.rb |