spec/lib/microformats2_spec.rb in microformats2-2.9.0 vs spec/lib/microformats2_spec.rb in microformats2-3.0.0

- old
+ new

@@ -7,27 +7,27 @@ <div class="h-card"><p class="p-name">Jessica Lynn Suttles</p></div> HTML end describe "::parse" do - it "returns a collection" do - Microformats2.parse(@html).should be_kind_of Microformats2::Collection + it "returns ParserResult" do + expect(Microformats2.parse(@html)).to be_kind_of Microformats2::Collection end end describe "::read_html" do it "can be a string of html" do - Microformats2.read_html(@html).should include @html + expect(Microformats2.read_html(@html)).to include @html end it "can be a file path to html" do html = "spec/support/lib/microformats2/simple.html" - Microformats2.read_html(html).should include "<div class=\"h-card\">" + expect(Microformats2.read_html(html)).to include "<div class=\"h-card\">" end it "can be a url to html" do stub_request(:get, "http://google.com/"). with(:headers => {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). to_return(:status => 200, :body => "google", :headers => {}) html = "http://google.com" - Microformats2.read_html(html).should include "google" + expect(Microformats2.read_html(html)).to include "google" end end end