Sha256: 102aa127d61fa9b2e9398ecb0380e7ebdf89fc9c3328f26de25ed7555573dcd2
Contents?: true
Size: 488 Bytes
Versions: 1
Compression:
Stored size: 488 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe User, 'filters:strip' do before do described_class.normalizy_rules = {} end specify do described_class.normalizy :name, with: :strip expect(described_class.create(name: ' Washington ').name).to eq 'Washington' end specify do described_class.normalizy :name, with: { strip: { side: :left } } expect(described_class.create(name: ' Washington ').name).to eq 'Washington ' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
normalizy-0.2.0 | spec/normalizy/extensions/filters/strip_spec.rb |