Sha256: 1ac4dc03e825e92e15f7e98ba3dfedafb7bfceddd2c3eec5b1ad8ff5516249e1

Contents?: true

Size: 413 Bytes

Versions: 2

Compression:

Stored size: 413 Bytes

Contents

require 'spec_helper'

describe Linguo::Config do
  describe ".api_key" do
    it "should raise an error when api_key is not set" do
      expect { Linguo::Config.api_key }.
        to raise_error Linguo::Errors::MissingApiKey
    end

    it "should return an API key when api_key is set" do
      Linguo::Config.api_key = 'valid_api_key'
      Linguo::Config.api_key.should == 'valid_api_key'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
linguo-0.0.2 spec/linguo/config_spec.rb
linguo-0.0.1 spec/linguo/config_spec.rb