Sha256: 19b8463e0b237249ae3f295e43fb60a2ae80717d06c9b7ee41b30e7f6dbe995a
Contents?: true
Size: 736 Bytes
Versions: 5
Compression:
Stored size: 736 Bytes
Contents
require "spec_helper" require "gettext_i18n_rails/haml_parser" describe GettextI18nRails::HamlParser do let(:parser){ GettextI18nRails::HamlParser } describe "#target?" do it "targets .haml" do parser.target?('foo/bar/xxx.haml').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 haml" do with_file '= _("xxxx")' do |path| parser.parse(path, []).should == [ ["xxxx", "#{path}:1"] ] end end it "does not find messages in text" do with_file '_("xxxx")' do |path| parser.parse(path, []).should == [] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems