File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11
11
required :H , :handler , 'specify the handler to use (webrick/mongrel/...)'
12
12
required :o , :host , 'specify the host to listen on (default: 127.0.0.1)'
13
13
required :p , :port , 'specify the port to listen on (default: 3000)'
14
- flag :L , :'live-reload' , 'reload on changes'
15
14
16
15
module Nanoc ::Live ::Commands
17
16
class Live < ::Nanoc ::CLI ::CommandRunner
@@ -20,7 +19,8 @@ def run
20
19
21
20
Thread . new do
22
21
Thread . current . abort_on_exception = true
23
- Nanoc ::CLI ::Commands ::View . new ( options , [ ] , self ) . run
22
+ view_options = options . merge ( 'live-reload' : true )
23
+ Nanoc ::CLI ::Commands ::View . new ( view_options , [ ] , self ) . run
24
24
end
25
25
26
26
Nanoc ::Live ::LiveRecompiler . new ( command_runner : self ) . run
Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ def run_cmd
42
42
end
43
43
end
44
44
45
- it 'receives websocket connections' do
46
- # TODO
45
+ it 'listens for websocket connections' do
46
+ run_cmd do
47
+ socket = TCPSocket . new ( 'localhost' , 35_729 )
48
+ expect ( socket ) . not_to be_closed
49
+ end
47
50
end
48
51
end
You can’t perform that action at this time.
0 commit comments