spec/spec_helper.rb in onebox-1.0.1 vs spec/spec_helper.rb in onebox-1.1.0

- old
+ new

@@ -13,14 +13,19 @@ RSpec.configure do |config| config.include HTMLSpecHelper end -shared_examples_for "engines" do - it "should behave like an engine" do +shared_examples_for "an engine" do + it "has engine behavior" do expect(described_class.private_instance_methods).to include(:data, :record, :raw) end - it "should have implemented a data method" do + it "has implemented the data functionality" do expect { described_class.new(link).send(:data) }.not_to raise_error + end + + it "correctly matches the url" do + onebox = Onebox::Matcher.new(link).oneboxed + expect(onebox).to be(described_class) end end