Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HintComponent and ErrorMessageComponent #98

Merged
merged 17 commits into from
Jan 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update spec/view_component/form/error_message_component_spec.rb
Co-authored-by: Simon Fish <si@mon.fish>
  • Loading branch information
tmaier and boardfish authored Jan 18, 2022
commit b8659043c9c869215b48a571d62f68b83ea1e805
5 changes: 2 additions & 3 deletions spec/view_component/form/error_message_component_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# frozen_string_literal: true

RSpec.describe ViewComponent::Form::ErrorMessageComponent, type: :component do
subject(:component) { described_class.new(form, object_name, :first_name, options) }
subject(:rendered_component) { render_inline(component) }
let(:component) { described_class.new(form, object_name, :first_name, options) }

let(:object_klass) do
Class.new do
Expand All @@ -22,8 +23,6 @@ def name
let(:object) { object_klass.new }
let(:form) { form_with(object) }
let(:options) { {} }

let(:rendered_component) { render_inline(component) }
let(:component_html_attributes) { rendered_component.css("div").first.attributes }

context "with valid object" do
Expand Down