Sha256: 53e50eddc2f863b254f5eb851d14e0b649a4000d69f0abb35a5f9b1b3f24b500

Contents?: true

Size: 506 Bytes

Versions: 9

Compression:

Stored size: 506 Bytes

Contents

require "spec_helper"

module Embedly
  describe API do
    let(:api) { API.new :key => ENV['EMBEDLY_KEY'], :secret => ENV['EMBEDLY_SECRET'] }

    describe "logger" do
      let(:io) { StringIO.new }

      before do
        Embedly.configure do |c|
          c.debug  = true
          c.logger = Logger.new(io)
        end
      end

      it "logs if debug is enabled" do
        api.oembed :url => 'http://blog.doki-pen.org/'
        io.string.should =~ %r{.*DEBUG -- : .*}
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
embedly-1.7.1 spec/embedly/api_spec.rb
embedly-1.7.0 spec/embedly/api_spec.rb
embedly-1.6.0 spec/embedly/api_spec.rb
embedly-1.5.6 spec/embedly/api_spec.rb
embedly-1.5.5 spec/embedly/api_spec.rb
embedly-1.5.4 spec/embedly/api_spec.rb
embedly-1.5.3 spec/embedly/api_spec.rb
embedly-1.5.2 spec/embedly/api_spec.rb
embedly-1.5.1 spec/embedly/api_spec.rb