Sha256: 4e90fbe05771e13e354407903069645d13a1191be5223cd6ba8a1841b0becfe3

Contents?: true

Size: 742 Bytes

Versions: 8

Compression:

Stored size: 742 Bytes

Contents

require 'spec_helper'

require 'listen/adapter/darwin'

include Listen

describe Adapter::Darwin do
  describe 'class' do
    subject { described_class }
    it { should be_local_fs }

    if darwin?
      it { should be_usable }
    else
      it { should_not be_usable }
    end
  end

  let(:options) { {} }
  let(:mq) { instance_double(Listener, options: options) }

  describe '#_latency' do
    subject do
      adapter = described_class.new(options.merge(mq: mq, directories: []))
      adapter.options.latency
    end

    context 'with no overriding option' do
      it { should eq 0.1 }
    end

    context 'with custom latency overriding' do
      let(:options) { { latency: 1234 } }
      it { should eq 1234 }
    end
  end
end

Version data entries

8 entries across 6 versions & 3 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/listen-2.7.9/spec/lib/listen/adapter/darwin_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/listen-2.7.9/spec/lib/listen/adapter/darwin_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/listen-2.7.9/spec/lib/listen/adapter/darwin_spec.rb
listen-2.7.11 spec/lib/listen/adapter/darwin_spec.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/listen-2.7.9/spec/lib/listen/adapter/darwin_spec.rb
listen-2.7.9 spec/lib/listen/adapter/darwin_spec.rb
listen-2.7.8 spec/lib/listen/adapter/darwin_spec.rb
listen-2.7.7 spec/lib/listen/adapter/darwin_spec.rb