Sha256: 2bb29951b753f86f91b35ed39cf2e899a6c07a80a86a3671a111919084d631e8
Contents?: true
Size: 1.29 KB
Versions: 25
Compression:
Stored size: 1.29 KB
Contents
# encoding: utf-8 # # This file is part of the lazier gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>. # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. # require "spec_helper" describe Lazier::String do let(:reference) { "abc òùà èé &gt;" } let(:translated_reference) { "abc oua ee &gt;" } let(:untitleized_reference) { "abc-òùà-èé-&gt;" } let(:amp_reference) { "abc òùà èé >" } before(:all) do ::Lazier.load! end describe "#remove_accents" do it "should translate accents" do expect(reference.remove_accents).to eq(translated_reference) end end describe "#untitleize" do it "should convert spaces to dashes" do expect(reference.untitleize).to eq(untitleized_reference) end end describe "#replace_ampersands" do it "should remove HTML ampersands" do expect(reference.replace_ampersands).to eq(amp_reference) end end describe "#value" do it "should return the string itself" do expect(reference.value).to eq(reference) expect(translated_reference.value).to eq(translated_reference) expect(untitleized_reference.value).to eq(untitleized_reference) expect(amp_reference.value).to eq(amp_reference) end end end
Version data entries
25 entries across 25 versions & 1 rubygems