Sha256: 3c399b4a903cb56b3bc054aeeb86970e874f651fb08256f5b28c98fea27e5525
Contents?: true
Size: 612 Bytes
Versions: 6
Compression:
Stored size: 612 Bytes
Contents
require 'spec_helper' describe 'Pattern Scanner' do describe 'default pattern' do let!(:pattern) { I18n::Tasks::Scanners::PatternScanner::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 pattern.should match s end end ["t \"a.b'", "t a.b"].each do |s| it "does not match #{s}" do pattern.should_not match s end end end end
Version data entries
6 entries across 6 versions & 1 rubygems