Sha256: faba5ec55318b4029d74069449fc67952d23a79485779e0e1bb48275b50d6de3
Contents?: true
Size: 948 Bytes
Versions: 17
Compression:
Stored size: 948 Bytes
Contents
require 'spec_helper' describe 'word_for' do before(:each) do WhowishWord.words = {} end it "no variables, no entry" do value = WhowishWord.word_for("namespace", "id") value.should == "namespace:id(en)" end it "with variables, no entry" do value = WhowishWord.word_for("namespace", "id", :number=>5, :name=>"tanin") value.should == "namespace:id(en){number,name}" end it "no variables, with entry" do WhowishWord.words = {"namespace:id(en)" => "hello"} value = WhowishWord.word_for("namespace", "id") value.should == "hello" end it "with variables, with entry" do WhowishWord.words = {"namespace:id(en)" => "hello {name} for {number} times"} value = WhowishWord.word_for("namespace", "id", :number=>5, :name=>"tanin") value.should == "hello tanin for 5 times" end end
Version data entries
17 entries across 17 versions & 1 rubygems