Skip to content

Commit 7f99670

Browse files
committed
fix: error message for rails 8+
1 parent 80d53b3 commit 7f99670

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

spec/paramoid/base_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
it 'raises an error' do
6060
expect { sanitized }.to raise_error(
6161
ActionController::ParameterMissing,
62-
'param is missing or the value is empty: current_user_id'
62+
/param is missing or the value is empty( or invalid)?: current_user_id/
6363
)
6464
end
6565
end

spec/paramoid/complex_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
it 'raises an error' do
9393
expect { sanitized }.to raise_error(
9494
ActionController::ParameterMissing,
95-
'param is missing or the value is empty: items.sub_items.id'
95+
/param is missing or the value is empty( or invalid)?: items.sub_items.id/
9696
)
9797
end
9898
end
@@ -160,7 +160,7 @@
160160
it 'raises an error' do
161161
expect { sanitized }.to raise_error(
162162
ActionController::ParameterMissing,
163-
'param is missing or the value is empty: buyer.payment_method.id'
163+
/param is missing or the value is empty( or invalid)?: buyer.payment_method.id/
164164
)
165165
end
166166
end

spec/paramoid/object_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
expect do
9999
subject.ensure_required_params!(params)
100100
end.to raise_error(ActionController::ParameterMissing,
101-
'param is missing or the value is empty: some_param')
101+
/param is missing or the value is empty( or invalid)?: some_param/)
102102
end
103103
end
104104

@@ -112,7 +112,7 @@
112112
expect do
113113
subject.ensure_required_params!(params)
114114
end.to raise_error(ActionController::ParameterMissing,
115-
'param is missing or the value is empty: some_param.nested')
115+
/param is missing or the value is empty( or invalid)?: some_param.nested/)
116116
end
117117
end
118118

@@ -123,7 +123,7 @@
123123
expect do
124124
subject.ensure_required_params!(params)
125125
end.to raise_error(ActionController::ParameterMissing,
126-
'param is missing or the value is empty: some_param')
126+
/param is missing or the value is empty( or invalid)?: some_param/)
127127
end
128128
end
129129

0 commit comments

Comments
 (0)