Sha256: 190698bb23420e5f7c482570ff47626344cc014bb29a82e300bebaa4762826c0

Contents?: true

Size: 644 Bytes

Versions: 5

Compression:

Stored size: 644 Bytes

Contents

#encoding: utf-8
require "spec_helper"

describe YoudaoFanyi do
  it "should has reload!" do
    YoudaoFanyi.should respond_to(:reload!)
  end

  it "should has api_key" do
    YoudaoFanyi.should respond_to(:api_key)
  end

  it "should fast define api_keys and rand use api_key from api_keys" do
    YoudaoFanyi.configure do |config|
      config.api_keys = YOUDAO_FANYI_API_KEYS
    end
    YoudaoFanyi::Configuration.api_keys.should include(YoudaoFanyi.api_key())
  end

  it "should has t" do
    YoudaoFanyi.should respond_to(:t)
  end

  it "t alias YoudaoFanyi::Translator.t" do
    YoudaoFanyi.t(:china).should == ["中国"]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
youdao_fanyi-0.1.2.2 spec/youdao_fanyi_spec.rb
youdao_fanyi-0.1.2.1 spec/youdao_fanyi_spec.rb
youdao_fanyi-0.1.2 spec/youdao_fanyi_spec.rb
youdao_fanyi-0.1.1 spec/youdao_fanyi_spec.rb
youdao_fanyi-0.1.0 spec/youdao_fanyi_spec.rb