Sha256: 0edb5f09886a5fcb89f76822dd67dfc57bdd995ed1cfea04a8ea0703b0ede291

Contents?: true

Size: 875 Bytes

Versions: 18

Compression:

Stored size: 875 Bytes

Contents

require 'spec_helper'
unless RUBY_PLATFORM == 'opal'
  require 'volt/server'

  describe Volt::ForkingServer do
    it 'should set polling an an option when using POLL_FS env' do
      ENV['POLL_FS'] = 'true'
      forking_server = Volt::ForkingServer.allocate

      # Lots of stubs, since we're working with the FS
      listener = double('listener')
      expect(listener).to receive(:start)
      expect(listener).to receive(:stop)
      expect(Listen).to receive(:to).with('/app/', {force_polling: true}).and_return(listener)
      expect(forking_server).to receive(:sync_mod_time)

      server = double('server')
      expect(server).to receive(:app_path).and_return('/app')
      forking_server.instance_variable_set(:@server, server)

      forking_server.start_change_listener
      ENV.delete('POLL_FS')

      forking_server.stop_change_listener
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
volt-0.9.7.pre8 spec/server/forking_server_spec.rb
volt-0.9.7.pre7 spec/server/forking_server_spec.rb
volt-0.9.7.pre6 spec/server/forking_server_spec.rb
volt-0.9.7.pre5 spec/server/forking_server_spec.rb
volt-0.9.7.pre3 spec/server/forking_server_spec.rb
volt-0.9.7.pre2 spec/server/forking_server_spec.rb
volt-0.9.6 spec/server/forking_server_spec.rb
volt-0.9.6.pre3 spec/server/forking_server_spec.rb
volt-0.9.6.pre2 spec/server/forking_server_spec.rb
volt-0.9.6.pre1 spec/server/forking_server_spec.rb
volt-0.9.5 spec/server/forking_server_spec.rb
volt-0.9.5.pre12 spec/server/forking_server_spec.rb
volt-0.9.5.pre11 spec/server/forking_server_spec.rb
volt-0.9.5.pre9 spec/server/forking_server_spec.rb
volt-0.9.5.pre8 spec/server/forking_server_spec.rb
volt-0.9.5.pre7 spec/server/forking_server_spec.rb
volt-0.9.5.pre6 spec/server/forking_server_spec.rb
volt-0.9.5.pre5 spec/server/forking_server_spec.rb