spec/spec_helper.rb in onebox-1.8.2 vs spec/spec_helper.rb in onebox-1.8.3

- old
+ new

@@ -4,10 +4,18 @@ require "onebox" require 'mocha/api' require_relative "support/html_spec_helper" +# Monkey-patch fakeweb to support Ruby 2.4+. +# See https://github.com/chrisk/fakeweb/pull/59. +module FakeWeb + class StubSocket + def close; end + end +end + RSpec.configure do |config| config.before(:all) do FakeWeb.allow_net_connect = false end config.include HTMLSpecHelper @@ -47,9 +55,13 @@ expect(data[:title]).not_to be_nil end it "includes link" do expect(data[:link]).not_to be_nil + end + + it "is serializable" do + expect { Marshal.dump(data) }.to_not raise_error end end end shared_examples_for "a layout engine" do