Sha256: 1bbf9b198617c50ccf1a8fc706707b86f0a03f4b3dadd3c5c5fd2d0161c3b2af

Contents?: true

Size: 625 Bytes

Versions: 6

Compression:

Stored size: 625 Bytes

Contents

require 'helper'

describe Lelylan do

  after do
    Lelylan.reset
  end

  let(:client) do
    a_client
  end

  describe '.respond_to?' do
    it 'should be true if method exists' do
      Lelylan.respond_to?(:new, true).should be_true
    end
  end

  describe '.new' do
    it 'should be a Lelylan::Client' do
      Lelylan.new.should be_a Lelylan::Client
    end
  end

  describe '.delegate' do
    it 'should delegate missing methods to Lelylan::Client' do
      stub_get('/devices').to_return(body: fixture('/devices.json'))
      devices = client.devices
      devices.first.uri.should_not be_nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lelylan-rb-0.1.0 spec/lelylan_spec.rb
lelylan-rb-0.0.5 spec/lelylan_spec.rb
lelylan-rb-0.0.4 spec/lelylan_spec.rb
lelylan-rb-0.0.3 spec/lelylan_spec.rb
lelylan-rb-0.0.2 spec/lelylan_spec.rb
lelylan-rb-0.0.1 spec/lelylan_spec.rb