Sha256: 695d7eaa60e987408c26fea1f250d327f95ae854ed32c78b22a85cdcb88ebf3b

Contents?: true

Size: 810 Bytes

Versions: 1

Compression:

Stored size: 810 Bytes

Contents

require 'spec_helper'

describe TweetStream::Daemon do
  describe ".new" do
    it "initializes with no arguments" do
      client = TweetStream::Daemon.new
      expect(client).to be_kind_of(TweetStream::Client)
    end

    it "initializes with defaults" do
      client = TweetStream::Daemon.new
      expect(client.app_name).to eq(TweetStream::Daemon::DEFAULT_NAME)
      expect(client.daemon_options).to eq(TweetStream::Daemon::DEFAULT_OPTIONS)
    end

    it "initializes with an app_name" do
      client = TweetStream::Daemon.new('tweet_tracker')
      expect(client.app_name).to eq('tweet_tracker')
    end
  end

  describe "#start" do
    it "starts the daemon" do
      client = TweetStream::Daemon.new
      Daemons.should_receive(:run_proc).once
      client.track('intridea')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tweetstream-2.4.0 spec/tweetstream/daemon_spec.rb