Sha256: 03343be2c838cbfb74d2c1ef6c5da9a264a221fbac0d371d2cb3d4cecfc4ae54

Contents?: true

Size: 701 Bytes

Versions: 1

Compression:

Stored size: 701 Bytes

Contents

# -*- coding: utf-8 -*-

require 'dict/dict'

describe Dict do

  it "should return array of available services which is not empty" do
    arr = Dict.available_dictionaries
    arr.should be_a(Array)
    arr.size.should_not == 0
  end

  it "should return array of available services, which contains wiktionary and dictpl" do        
    Dict.available_dictionaries.should == ['wiktionary', 'dictpl']
  end
  
 
  
  it "should return whatever Dictpl returns embedded in a hash" do
    dictpl = stub(:translate => 'DICTPL_RESULTS')
    Dict::Dictpl.should_receive(:new).with('WORD').and_return(dictpl)
    Dict.get_single_dictionary_translations('WORD', 'dictpl').should == 'DICTPL_RESULTS'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dict-0.2.3 spec/dict/lib_dict_spec.rb