Sha256: 92f60e10e7c721b6e34829e14f7cadb4943785395d237d50e971152cf9ae04e7

Contents?: true

Size: 1.22 KB

Versions: 121

Compression:

Stored size: 1.22 KB

Contents

require 'spec_helper'

describe Listen::Adapters::Linux do
  if linux?
    if Listen::Adapters::Linux.usable?
      it "is usable on Linux" do
        described_class.should be_usable
      end

      it_should_behave_like 'a filesystem adapter'
      it_should_behave_like 'an adapter that call properly listener#on_change'

      describe '#initialize' do
        context 'when the inotify limit for watched files is not enough' do
          before { INotify::Notifier.any_instance.should_receive(:watch).and_raise(Errno::ENOSPC) }

          it 'fails gracefully' do
            described_class.any_instance.should_receive(:abort).with(described_class::INOTIFY_LIMIT_MESSAGE)
            described_class.new(File.dirname(__FILE__))
          end
        end
      end
    else
      it "isn't usable on Linux with #{RbConfig::CONFIG['RUBY_INSTALL_NAME']}" do
        described_class.should_not be_usable
      end
    end
  end

  if bsd?
    it "isn't usable on BSD" do
      described_class.should_not be_usable
    end
  end

  if mac?
    it "isn't usable on Mac OS X" do
      described_class.should_not be_usable
    end
  end

  if windows?
    it "isn't usable on Windows" do
      described_class.should_not be_usable
    end
  end
end

Version data entries

121 entries across 112 versions & 10 rubygems

Version Path
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/sass-3.2.7/vendor/listen/spec/listen/adapters/linux_spec.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/sass-3.2.7/vendor/listen/spec/listen/adapters/linux_spec.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/sass-3.2.7/vendor/listen/spec/listen/adapters/linux_spec.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/sass-3.2.8/vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.2.9 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.136 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.134 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.133 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.2.8 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.129 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.128 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.127 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.132 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.121 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.120 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.107 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.103 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.2.7 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.102 vendor/listen/spec/listen/adapters/linux_spec.rb
sass-3.3.0.alpha.101 vendor/listen/spec/listen/adapters/linux_spec.rb