Sha256: c55f5ecdf93e1e07fcca7604d53c8be2fbcceb26c5b369f23921c8b425240e28

Contents?: true

Size: 783 Bytes

Versions: 42

Compression:

Stored size: 783 Bytes

Contents

require './spec/spec_helper'

describe SparkApi do

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

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

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

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

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

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

    SparkApi.logger.level.should eq(Logger::WARN)
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
spark_api-1.4.12 spec/unit/spark_api_spec.rb
spark_api-1.4.11 spec/unit/spark_api_spec.rb
spark_api-1.4.10 spec/unit/spark_api_spec.rb
spark_api-1.4.9 spec/unit/spark_api_spec.rb
spark_api-1.4.8 spec/unit/spark_api_spec.rb
spark_api-1.4.6 spec/unit/spark_api_spec.rb
spark_api-1.4.5 spec/unit/spark_api_spec.rb
spark_api-1.4.4 spec/unit/spark_api_spec.rb
spark_api-1.4.2 spec/unit/spark_api_spec.rb
spark_api-1.4.1 spec/unit/spark_api_spec.rb
spark_api-1.4.0 spec/unit/spark_api_spec.rb
spark_api-1.3.28 spec/unit/spark_api_spec.rb
spark_api-1.3.27 spec/unit/spark_api_spec.rb
spark_api-1.3.26 spec/unit/spark_api_spec.rb
spark_api-1.3.25 spec/unit/spark_api_spec.rb
spark_api-1.3.24 spec/unit/spark_api_spec.rb
spark_api-1.3.23 spec/unit/spark_api_spec.rb
spark_api-1.3.21 spec/unit/spark_api_spec.rb
spark_api-1.3.20 spec/unit/spark_api_spec.rb
spark_api-1.3.19 spec/unit/spark_api_spec.rb