Infer type for component specs automatically

This commit is contained in:
Javi Martín
2021-08-17 22:07:39 +02:00
parent e5cd763385
commit 4cbf945228
51 changed files with 54 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
require "rails_helper"
describe Admin::Poll::Officers::OfficersComponent, type: :component, controller: Admin::BaseController do
describe Admin::Poll::Officers::OfficersComponent, controller: Admin::BaseController do
let(:existing_officer) { create(:poll_officer, name: "Old officer") }
let(:new_officer) { build(:poll_officer, name: "New officer") }
let(:officers) { [existing_officer, new_officer] }

View File

@@ -1,6 +1,6 @@
require "rails_helper"
describe Admin::Poll::Questions::FilterComponent, type: :component do
describe Admin::Poll::Questions::FilterComponent do
it "renders a button to submit the form" do
render_inline Admin::Poll::Questions::FilterComponent.new([])