# encoding: utf-8 require 'spec_helper' require 'oneboxer' require 'oneboxer/wikipedia_onebox' describe Oneboxer::WikipediaOnebox do before(:each) do @o = Oneboxer::WikipediaOnebox.new("http://en.wikipedia.org/wiki/Ruby") FakeWeb.register_uri(:get, @o.translate_url, :response => fixture_file('oneboxer/wikipedia.response')) FakeWeb.register_uri(:get, 'http://en.m.wikipedia.org/wiki/Ruby', :response => fixture_file('oneboxer/wikipedia_redirected.response')) end it "generates the expected onebox for Wikipedia" do @o.onebox.should == expected_wikipedia_result end private def expected_wikipedia_result <

Ruby

A ruby is a pink to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). The red color is caused mainly by the presence of the element chromium. Its name comes from ruber, Latin for red. Other varieties of gem-quality corundum are called sapphires. The ruby is considered one of the four precious stones, together with the sapphire, the emerald, and the diamond. Prices of rubies are primarily determined by color. The brightest and most valuable "red" called pigeon blood-...
EXPECTED end end