DEV: Make the first argument to the top-level describe a constant in specs

This commit is contained in:
Loïc Guitaut
2022-08-08 16:05:41 +02:00
committed by Loïc Guitaut
parent 8b8cbe7905
commit 00b3f0e2c4
6 changed files with 72 additions and 84 deletions

View File

@ -86,22 +86,22 @@ RSpec.describe Onebox::Engine do
expect(result).to match(/https/)
end
end
end
RSpec.describe ".onebox_name" do
module ScopeForTemplateName
class TemplateNameOnebox
include Onebox::Engine
describe ".onebox_name" do
module ScopeForTemplateName
class TemplateNameOnebox
include Onebox::Engine
end
end
let(:onebox_name) { ScopeForTemplateName::TemplateNameOnebox.onebox_name }
it "should not include the scope" do
expect(onebox_name).not_to include("ScopeForTemplateName", "scopefortemplatename")
end
it "should not include the word Onebox" do
expect(onebox_name).not_to include("onebox", "Onebox")
end
end
let(:onebox_name) { ScopeForTemplateName::TemplateNameOnebox.onebox_name }
it "should not include the scope" do
expect(onebox_name).not_to include("ScopeForTemplateName", "scopefortemplatename")
end
it "should not include the word Onebox" do
expect(onebox_name).not_to include("onebox", "Onebox")
end
end