Sha256: 7fdfee353cad00398bdc1b48ec1d774330c879724c4ca324b8cd779c97de7e7b

Contents?: true

Size: 670 Bytes

Versions: 6

Compression:

Stored size: 670 Bytes

Contents

require 'minitest/spec'
require 'minitest/autorun'
require 'connect_client/configuration'
require 'connect_client'

describe ConnectClient do
  before do  
    ConnectClient.reset
  end

  it "should throw a configuration error configuration has not been called" do
    connect_event = proc { ConnectClient.push 'test', {} }.must_raise ConnectClient::UnconfiguredError
  end

  it "should respond to push" do
    ConnectClient.configure {}
    ConnectClient.respond_to?(:push).must_equal true
  end

  it "should support configuration via a block" do
    ConnectClient.configure do |config|
      config.must_be_instance_of ConnectClient::Configuration
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
connect_client-0.2.2 spec/connect_client_spec.rb
connect_client-0.2.1 spec/connect_client_spec.rb
connect_client-0.1.6 spec/connect_client_spec.rb
connect_client-0.1.5 spec/connect_client_spec.rb
connect_client-0.1.4 spec/connect_client_spec.rb
connect_client-0.1.3 spec/connect_client_spec.rb