Infer type for component specs automatically
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Shared::AdvancedSearchComponent, type: :component do
|
||||
describe Shared::AdvancedSearchComponent do
|
||||
let(:component) { Shared::AdvancedSearchComponent.new }
|
||||
|
||||
context "JavaScript disabled" do
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Shared::BannerComponent, type: :component do
|
||||
describe Shared::BannerComponent do
|
||||
it "renders given a banner" do
|
||||
banner = create(:banner,
|
||||
title: "Vote now!",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Shared::FilterSelectorComponent, type: :component do
|
||||
describe Shared::FilterSelectorComponent do
|
||||
it "renders a form with a select" do
|
||||
component = Shared::FilterSelectorComponent.new(i18n_namespace: "budgets.investments.index")
|
||||
allow(component).to receive(:valid_filters).and_return(["unfeasible", "winners"])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Shared::LinkListComponent, type: :component do
|
||||
describe Shared::LinkListComponent do
|
||||
it "renders nothing with an empty list" do
|
||||
render_inline Shared::LinkListComponent.new
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Shared::TagListComponent, type: :component do
|
||||
describe Shared::TagListComponent do
|
||||
let(:user_tag) { create(:tag, name: "user tag") }
|
||||
let(:ml_tag) { create(:tag, name: "machine learning tag") }
|
||||
let(:proposal) { create(:proposal, tag_list: [user_tag], ml_tag_list: [ml_tag]) }
|
||||
|
||||
Reference in New Issue
Block a user