Sha256: d4538bfc3772618ffd16d66757ec74474893d0eee184607f94fac789f55eb9c9
Contents?: true
Size: 744 Bytes
Versions: 3
Compression:
Stored size: 744 Bytes
Contents
require "spec_helper" require "gettext_i18n_rails/slim_parser" describe GettextI18nRails::SlimParser do let(:parser){ GettextI18nRails::SlimParser } describe "#target?" do it "targets .slim" do parser.target?('foo/bar/xxx.slim').should == true end it "does not target anything else" do parser.target?('foo/bar/xxx.erb').should == false end end describe "#parse" do it "finds messages in slim" do with_file 'div = _("xxxx")' do |path| parser.parse(path, []).should == [ ["xxxx", "#{path}:1"] ] end end it "does not find messages in text" do with_file 'div _("xxxx")' do |path| parser.parse(path, []).should == [] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems