Sha256: 51cdebf97a80fd6662e1209d26781839507836e775d1619ca25529ab6bd4ba7e
Contents?: true
Size: 639 Bytes
Versions: 21
Compression:
Stored size: 639 Bytes
Contents
# coding: utf-8 require 'spec_helper' describe 'Pattern Scanner' do describe 'default pattern' do let!(:pattern) { I18n::Tasks::Scanners::PatternScanner.new.default_pattern } ['t "a.b"', "t 'a.b'", 't("a.b")', "t('a.b')", "t('a.b', :arg => val)", "t('a.b', arg: val)", "t :a_b", "t :'a.b'", 't :"a.b"', "t(:ab)", "t(:'a.b')", 't(:"a.b")', 'I18n.t("a.b")', 'I18n.translate("a.b")'].each do |s| it "matches #{s}" do expect(pattern).to match s end end ["t \"a.b'", "t a.b"].each do |s| it "does not match #{s}" do expect(pattern).to_not match s end end end end
Version data entries
21 entries across 21 versions & 1 rubygems