Commit 7b2946f6 authored by Arturo Herrero's avatar Arturo Herrero

Use validators_on instead of _validators

This uses the public method validators_on instead of _validators that
it's a hidden detail.
parent c4b812e5
......@@ -15,7 +15,7 @@ describe Avatarable do
end
describe '#update' do
let(:validator) { project._validators[:avatar].detect { |v| v.is_a?(FileSizeValidator) } }
let(:validator) { project.class.validators_on(:avatar).find { |v| v.is_a?(FileSizeValidator) } }
context 'when avatar changed' do
it 'validates the file size' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment