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 d5c3163c68bcb200a12102abc4f990eed75744b7
6 changes: 1 addition & 5 deletions spec/view_component/form/error_message_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ def name
it { expect(component.method_errors).to eq(["Can't be blank", "Is too short (minimum is 2 characters)"]) }
it { expect(component.render?).to be true }

it do
expect(rendered_component).to eq_html <<~HTML
<div>Can't be blank<br>Is too short (minimum is 2 characters)</div>
HTML
end
it { is_expected.to eq_html '<div>Can't be blank<br>Is too short (minimum is 2 characters)</div>' }
Spone marked this conversation as resolved.
Show resolved Hide resolved
end

include_examples "component with custom html classes"
Expand Down