forked from vim-test/vim-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeception_spec.vim
More file actions
98 lines (72 loc) · 2.3 KB
/
codeception_spec.vim
File metadata and controls
98 lines (72 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
source spec/support/helpers.vim
describe "Codeception"
before
cd spec/fixtures/codeception
end
after
call Teardown()
cd -
end
it "runs cest file tests"
view tests/functional/NormalCest.php
TestFile
Expect g:test#last_command == 'codecept run tests/functional/NormalCest.php'
end
it "runs cept file tests"
view tests/functional/NormalCept.php
TestFile
Expect g:test#last_command == 'codecept run tests/functional/NormalCept.php'
end
it "runs feature file tests"
view tests/functional/Normal.feature
TestFile
Expect g:test#last_command == 'codecept run tests/functional/Normal.feature'
end
it "runs unit test file"
view tests/functional/NormalTest.php
TestFile
Expect g:test#last_command == 'codecept run tests/functional/NormalTest.php'
end
it "runs cest nearest tests"
view +21 tests/functional/NormalCest.php
TestNearest
Expect g:test#last_command ==
\ 'codecept run tests/functional/NormalCest.php::tryToTestSomethingElse$'
end
it "runs cept nearest tests"
view +3 tests/functional/NormalCept.php
TestNearest
Expect g:test#last_command == 'codecept run tests/functional/NormalCept.php'
end
it "runs feature nearest tests"
view +1 tests/functional/Normal.feature
TestNearest
Expect g:test#last_command == 'codecept run tests/functional/Normal.feature'
end
it "runs nearest unit tests"
view +23 tests/functional/NormalTest.php
TestNearest
Expect g:test#last_command ==
\ 'codecept run tests/functional/NormalTest.php::testMe$'
end
it "runs test suites"
view tests/functional/NormalCest.php
TestSuite
Expect g:test#last_command == 'codecept run'
end
it "doesn't recognize files that don't end with 'Cest', 'Cept' or 'Test'"
view tests/functional/normal.php
TestFile
Expect exists('g:test#last_command') == 0
end
it "also recognizes codeception.dist.yml"
try
!mv fixtures/codeception/codeception.yml fixtures/codeception/codeception.dist.yml
view tests/functional/NormalCest.php
TestFile
Expect g:test#last_command == 'codecept run tests/functional/NormalCest.php'
finally
!mv fixtures/codeception/codeception.dist.yml fixtures/codeception/codeception.yml
endtry
end
end