Sha256: e473d689d4ef527597f55b3fc03dc070a524566139dc89b7fdc95ee8dc501b2e

Contents?: true

Size: 601 Bytes

Versions: 61

Compression:

Stored size: 601 Bytes

Contents

var I18n = require("../../app/assets/javascripts/i18n");

describe("Placeholder", function(){
  beforeEach(function(){
    I18n.reset();
  });

  it("matches {{name}}", function(){
    expect("{{name}}").toMatch(I18n.placeholder);
  });

  it("matches %{name}", function(){
    expect("%{name}").toMatch(I18n.placeholder);
  });

  it("returns placeholders", function(){
    var translation = "I like %{javascript}. I also like %{ruby}"
      , matches = translation.match(I18n.placeholder);
    ;

    expect(matches[0]).toEqual("%{javascript}");
    expect(matches[1]).toEqual("%{ruby}");
  });
});

Version data entries

61 entries across 61 versions & 3 rubygems

Version Path
i18n-js-3.9.2 spec/js/placeholder.spec.js
i18n-js-3.9.1 spec/js/placeholder.spec.js
i18n-js-3.9.0 spec/js/placeholder.spec.js
i18n-js-3.8.4 spec/js/placeholder.spec.js
i18n-js-3.8.3 spec/js/placeholder.spec.js
i18n-js-3.8.2 spec/js/placeholder.spec.js
i18n-js-3.8.1 spec/js/placeholder.spec.js
i18n-js-3.8.0 spec/js/placeholder.spec.js
i18n-js-3.7.1 spec/js/placeholder.spec.js
i18n-js-3.7.0 spec/js/placeholder.spec.js
i18n-js-3.6.0 spec/js/placeholder.spec.js
i18n-js-3.5.1 spec/js/placeholder.spec.js
i18n-js-3.5.0 spec/js/placeholder.spec.js
i18n-js-3.4.2 spec/js/placeholder.spec.js
i18n-js-3.4.1 spec/js/placeholder.spec.js
i18n-js-3.4.0 spec/js/placeholder.spec.js
i18n-js-3.3.0 spec/js/placeholder.spec.js
i18n-js-3.2.3 spec/js/placeholder.spec.js
i18n-js-3.2.2 spec/js/placeholder.spec.js
i18n-js-3.2.1 spec/js/placeholder.spec.js