Sha256: 2cb50545ec2cd705c39639d5a6e82d3fc1399bf739005f3d888df78638db0117

Contents?: true

Size: 560 Bytes

Versions: 14

Compression:

Stored size: 560 Bytes

Contents

require "spec_helper"

describe Frenchy do
  describe ".register_service" do
    it "registers the service in the module" do
      Frenchy.register_service("github", {"host" => "https://api.github.com"})
      client = Frenchy.find_service("github")
      expect(client).to be_an_instance_of(Frenchy::Client)
      expect(client.host).to eql("https://api.github.com")
    end
  end

  describe ".find_service" do
    it "raises an error for missing services" do
      expect{Frenchy.find_service("nonexistent")}.to raise_error(Frenchy::Error)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
frenchy-0.5.2 spec/lib/frenchy_spec.rb
frenchy-0.5.1 spec/lib/frenchy_spec.rb
frenchy-0.5.0 spec/lib/frenchy_spec.rb
frenchy-0.4.0 spec/lib/frenchy_spec.rb
frenchy-0.3.0 spec/lib/frenchy_spec.rb
frenchy-0.2.9 spec/lib/frenchy_spec.rb
frenchy-0.2.8 spec/lib/frenchy_spec.rb
frenchy-0.2.7 spec/lib/frenchy_spec.rb
frenchy-0.2.6 spec/lib/frenchy_spec.rb
frenchy-0.2.5 spec/lib/frenchy_spec.rb
frenchy-0.2.4 spec/lib/frenchy_spec.rb
frenchy-0.2.3 spec/lib/frenchy_spec.rb
frenchy-0.2.2 spec/lib/frenchy_spec.rb
frenchy-0.2.1 spec/lib/frenchy_spec.rb