DEV: Use proper wording for contexts in specs

This commit is contained in:
Loïc Guitaut
2022-08-04 11:05:02 +02:00
committed by Loïc Guitaut
parent 02987e05d5
commit 3eaac56797
337 changed files with 2172 additions and 2723 deletions
+3 -5
View File
@@ -1,9 +1,7 @@
# frozen_string_literal: true
RSpec.describe RetrieveTitle do
context "extract_title" do
describe ".extract_title" do
it "will extract the value from the title tag" do
title = RetrieveTitle.extract_title(
"<html><title>My Cool Title</title></html>"
@@ -55,7 +53,7 @@ RSpec.describe RetrieveTitle do
end
end
context "crawl" do
describe ".crawl" do
it "can properly extract a title from a url" do
stub_request(:get, "https://brelksdjflaskfj.com/amazing")
.to_return(status: 200, body: "<html><title>very amazing</title>")
@@ -156,7 +154,7 @@ RSpec.describe RetrieveTitle do
end
end
context 'fetch_title' do
describe '.fetch_title' do
it "does not parse broken title tag" do
# webmock does not do chunks
stub_request(:get, "https://en.wikipedia.org/wiki/Internet").