File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 10
10
require_relative 'coordinator'
11
11
12
12
require_relative 'deprecation_logger'
13
+ require_relative 'dsl'
13
14
14
15
require_relative 'exception'
15
16
35
36
require_relative 'backends/printer'
36
37
require_relative 'backends/netssh'
37
38
require_relative 'backends/local'
38
- require_relative 'backends/skipper'
39
+ require_relative 'backends/skipper'
Original file line number Diff line number Diff line change @@ -13,5 +13,3 @@ def run_locally(&block)
13
13
end
14
14
15
15
end
16
-
17
- include SSHKit ::DSL
Original file line number Diff line number Diff line change
1
+ require 'helper'
2
+
3
+ module SSHKit
4
+
5
+ class TestDSL < UnitTest
6
+ include SSHKit ::DSL
7
+
8
+ def test_dsl_on
9
+ coordinator = mock
10
+ Coordinator . stubs ( :new ) . returns coordinator
11
+ coordinator . expects ( :each ) . at_least_once
12
+
13
+ on ( '1.2.3.4' )
14
+ end
15
+
16
+ def test_dsl_run_locally
17
+ local_backend = mock
18
+ Backend ::Local . stubs ( :new ) . returns local_backend
19
+ local_backend . expects ( :run ) . at_least_once
20
+
21
+ run_locally
22
+ end
23
+
24
+ end
25
+
26
+ end
You can’t perform that action at this time.
0 commit comments