Sha256: 6e3a32096c1048ce3f296b124807bfe02050dbb298b3047650422c71eaa1107c

Contents?: true

Size: 625 Bytes

Versions: 6

Compression:

Stored size: 625 Bytes

Contents

require 'spec_helper'

describe UV::Check do
  let(:handle_name) { :check }
  let(:loop) { double() }
  let(:pointer) { double() }
  subject { UV::Check.new(loop, pointer) }

  it_behaves_like 'a handle'

  describe "#start" do
    it "requires a block" do
      expect { subject.start }.to raise_error(ArgumentError)
    end

    it "calls UV.check_start" do
      UV.should_receive(:check_start).with(pointer, subject.method(:on_check))

      subject.start { |e| }
    end
  end

  describe "#stop" do
    it "calls UV.check_stop" do
      UV.should_receive(:check_stop).with(pointer)

      subject.stop
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
uvrb-0.2.0 spec/uv/check_spec.rb
uvrb-0.1.4 spec/uv/check_spec.rb
uvrb-0.1.3 spec/uv/check_spec.rb
uvrb-0.1.2 spec/uv/check_spec.rb
uvrb-0.1.1 spec/uv/check_spec.rb
uvrb-0.1.0 spec/uv/check_spec.rb