Sha256: 5a81841e45faf94e3ecf5659ea53ecec9fe97fea9196199b9e2737a91c503bd5
Contents?: true
Size: 925 Bytes
Versions: 3
Compression:
Stored size: 925 Bytes
Contents
require 'hentry_consumer' describe HentryConsumer::HFeed do let(:feed) { HentryConsumer.parse(File.open("spec/support/example.html")) } describe "#to_json" do let(:json) { JSON.parse(feed.to_json) } it { json["items"].first["type"].should include 'h-feed'} it { json["items"].first["properties"]["entries"].should be_an_instance_of Array } it { json["items"].first["properties"]["entries"].should be_an_instance_of Array } it { json["items"].first["properties"]["entries"].first["type"].should include "h-entry" } end describe "#to_s" do let(:string) { feed.to_s } it "should have nicely formatted content" do string.should match feed.to_html end end describe "#to_html" do let(:html) { feed.to_html } it "should match the example html" do html.gsub(/\\n|\s/, '').should eq File.open("spec/support/example.html").read.gsub(/\\n|\s/, '') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hentry_consumer-0.6.0 | spec/lib/hentry_consumer/h_feed_spec.rb |
hentry_consumer-0.5.3 | spec/lib/hentry_consumer/h_feed_spec.rb |
hentry_consumer-0.5.2 | spec/lib/hentry_consumer/h_feed_spec.rb |