Sha256: 2fbe53c472846634d9ab05f7c9a63844d98c115f2ef768c64d54c25976e74bbc

Contents?: true

Size: 715 Bytes

Versions: 1

Compression:

Stored size: 715 Bytes

Contents

$:.unshift File.join(File.expand_path(File.dirname(__FILE__)), "..", "lib")

require 'i15r/pattern_matcher'
require "spec"

describe I15R::PatternMatchers::Base do
  it "should not replace a simple haml div tag with an id" do
    plain = %(#main)
    I15R::PatternMatchers::Base.run(plain, "users.new", :haml).should == plain
  end
  it "should properly replace a line with two matches" do
    plain = %(This is it: <a title="site root" href="/"><img src="site_logo.png" /></a>)
    i18ned = %(<%= I18n.t("users.new.this_is_it") %>: <a title="<%= I18n.t("users.new.site_root") %>" href="/"><img src="site_logo.png" /></a>)
    I15R::PatternMatchers::Base.run(plain, "users.new", :erb).should == i18ned
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i15r-0.3.1 spec/pattern_matcher_spec.rb