Sha256: 9e6ac7b986bd26ce1506c19457608bec71f6801b134853f735b8e102c28cda1d
Contents?: true
Size: 954 Bytes
Versions: 1
Compression:
Stored size: 954 Bytes
Contents
# -*- encoding: utf-8 -* require 'dict/wiktionary' describe Dict::Wiktionary do it "should raise no given word exception" do expect { Dict::Wiktionary.new }.to raise_error ArgumentError end it "should return an two element array of translations of word samochód containing [\"car\",\"automobile\"]" do w = Dict::Wiktionary.new('samochód', WIKI_URL) w.translate w.translations.should == ["car", "automobile"] end it "should return array with translations" do w = Dict::Wiktionary.new('samochód', WIKI_URL) w.translate w.translations.should be_a(Array) end it "should return array with examples of translated words" do w = Dict::Wiktionary.new('samochód', WIKI_URL) w.translate w.examples.should be_a(Array) end it "should return a hash from array of paired values" do w = Dict::Wiktionary.new('samochód', WIKI_URL) w.make_hash_results(w.translate).should be_a(Hash) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dict-0.2.1 | spec/dict/lib_wiktionary_spec.rb |