Sha256: 7d0976b72ab98d5ab67128f1b79b441fe9abd4384229aac430be0601f26fc658

Contents?: true

Size: 807 Bytes

Versions: 12

Compression:

Stored size: 807 Bytes

Contents

require './spec/spec_helper'

describe SparkApi do

  it "should use 'yajl-ruby' for parsing json" do
    expect(MultiJson.engine).to eq(MultiJson::Adapters::Yajl) unless jruby?
  end

  it "should load the version" do
    expect(subject::VERSION).to match(/\d+\.\d+\.\d+/)
  end

  it "should give me a client connection" do
    expect(subject.client).to be_a(SparkApi::Client)
  end

  it "should reset my connection" do
    c1 = subject.client
    subject.reset
    expect(subject.client).not_to eq(c1)
  end

  it "should let me override the default logger" do
    expect(subject.logger.level).to eq(Logger::DEBUG) # default overridden in spec_helper

    subject.logger = Logger.new('/dev/null')
    subject.logger.level = Logger::WARN

    expect(SparkApi.logger.level).to eq(Logger::WARN)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spark_api-1.6.3 spec/unit/spark_api_spec.rb
spark_api-1.6.2 spec/unit/spark_api_spec.rb
spark_api-1.6.1 spec/unit/spark_api_spec.rb
spark_api-1.5.7 spec/unit/spark_api_spec.rb
spark_api-1.6.0 spec/unit/spark_api_spec.rb
spark_api-1.5.6 spec/unit/spark_api_spec.rb
spark_api-1.5.5 spec/unit/spark_api_spec.rb
spark_api-1.5.4 spec/unit/spark_api_spec.rb
spark_api-1.5.3 spec/unit/spark_api_spec.rb
spark_api-1.5.2 spec/unit/spark_api_spec.rb
spark_api-1.5.1 spec/unit/spark_api_spec.rb
spark_api-1.5.0 spec/unit/spark_api_spec.rb