Sha256: 9f4ca573f810e5ba12aa3447baf818b11b3f095e750d2400c491f694710ca393
Contents?: true
Size: 1.3 KB
Versions: 24
Compression:
Stored size: 1.3 KB
Contents
require File.join(File.dirname(__FILE__), "..", "..", "spec_helper.rb") describe "Feed" do before :all do FakeWeb.register_uri("http://slashdot.org/index.rdf", :file => File.join(SPEC_DIR, 'supports', 'slashdot.xml')) @source = Smoke.feed(:slashdot) do url "http://slashdot.org/index.rdf" url "http://slashdot.org/index.rdf" emit do rename(:link => :url) end end end # it_should_behave_like "all sources" it "should have been activated" do Smoke[:slashdot].should(be_an_instance_of(Smoke::Source::Feed)) end it "should be a list of things" do Smoke[:slashdot].items.should be_an_instance_of(Array) end it "should respond to url" do Smoke[:slashdot].should respond_to(:url) end describe "after dispatch / query" do before do Smoke[:slashdot].output end it "should accept multiple urls" do Smoke[:slashdot].requests.should be_an_instance_of(Array) end it "should hold the url used to query" do Smoke[:slashdot].requests.collect{|r| r.uri }.should include("http://slashdot.org/index.rdf") end it "should have renamed url to link" do Smoke[:slashdot].output.first.should have_key(:url) Smoke[:slashdot].output.first.should_not have_key(:link) end end end
Version data entries
24 entries across 24 versions & 2 rubygems