git-contest 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/lib/contest/driver/aizu_online_judge.rb +13 -15
- data/lib/contest/driver/base.rb +5 -0
- data/lib/contest/driver/codeforces.rb +8 -14
- data/lib/contest/driver/kattis.rb +6 -9
- data/lib/contest/driver/uva_online_judge.rb +6 -9
- data/lib/git/contest/version.rb +1 -1
- data/spec/bin/t004_git_contest_submit_spec.rb +64 -58
- data/spec/bin/t005_git_contest_branching_spec.rb +33 -46
- data/spec/bin/t007_git_contest_start_spec.rb +19 -52
- data/spec/bin/t008_git_contest_finish_spec.rb +24 -91
- data/spec/bin/t009_git_contest_init_spec.rb +25 -52
- data/spec/lib/contest/driver/t001_aizu_online_judge_spec.rb +24 -28
- data/spec/lib/contest/driver/t002_codeforces_spec.rb +4 -21
- data/spec/lib/contest/driver/t003_uva_online_judge_spec.rb +15 -28
- data/spec/lib/contest/driver/t010_kattis_spec.rb +2 -14
- data/spec/spec_helper.rb +54 -40
- data/spec/t006_config_spec.rb +115 -76
- metadata +26 -48
- data/spec/mock/t004/config.yml +0 -17
- data/spec/mock/t005/001/config.yml +0 -5
- data/spec/mock/t006/001/001/001/config.yml +0 -8
- data/spec/mock/t006/001/001/002/config.yml +0 -8
- data/spec/mock/t006/001/001/003/config.yml +0 -8
- data/spec/mock/t006/001/002/001/config.yml +0 -8
- data/spec/mock/t006/001/002/002/config.yml +0 -8
- data/spec/mock/t006/001/002/003/config.yml +0 -8
- data/spec/mock/t006/001/003/001/config.yml +0 -9
- data/spec/mock/t006/001/003/002/config.yml +0 -9
- data/spec/mock/t006/001/003/003/config.yml +0 -9
@@ -1,83 +1,70 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe "T005" do
|
4
|
-
|
5
|
-
before(:each) do
|
6
|
-
init_env
|
7
|
-
ENV['GIT_CONTEST_HOME'] = get_path('/mock/default_config')
|
8
|
-
@test_dir = "#{ENV['GIT_CONTEST_TEMP_DIR']}/t005"
|
9
|
-
Dir.mkdir @test_dir
|
10
|
-
Dir.chdir @test_dir
|
11
|
-
# ENV['GIT_CONTEST_DEBUG'] = 'ON'
|
12
|
-
end
|
13
|
-
|
14
|
-
after(:each) do
|
15
|
-
Dir.chdir '..'
|
16
|
-
FileUtils.remove_dir @test_dir, :force => true
|
17
|
-
end
|
18
|
-
|
19
|
-
describe "001" do
|
20
|
-
|
3
|
+
describe "T005: branching" do
|
4
|
+
context "A001" do
|
21
5
|
before do
|
22
|
-
ENV['GIT_CONTEST_CONFIG'] =
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
Dir.chdir '001'
|
6
|
+
ENV['GIT_CONTEST_CONFIG'] = "#{@temp_dir}/home/config.yml"
|
7
|
+
File.open ENV['GIT_CONTEST_CONFIG'], "w" do |file|
|
8
|
+
file.write <<EOF
|
9
|
+
sites:
|
10
|
+
test_dummy:
|
11
|
+
driver: dummy
|
12
|
+
user: dummy
|
13
|
+
password: dummy
|
14
|
+
EOF
|
32
15
|
end
|
16
|
+
end
|
33
17
|
|
18
|
+
context 'B001' do
|
34
19
|
it '001: init -> start -> submit -> submit -> finish' do
|
35
20
|
Dir.mkdir 'test1'
|
36
21
|
Dir.chdir 'test1'
|
22
|
+
|
37
23
|
# Init
|
38
24
|
bin_exec "init --defaults"
|
39
|
-
git_current_branch.
|
25
|
+
expect(git_current_branch).to eq 'master'
|
40
26
|
ret = git_do "log --oneline"
|
41
|
-
ret.include
|
27
|
+
expect(ret).to include 'Initial commit'
|
28
|
+
|
42
29
|
# Start
|
43
30
|
bin_exec "start contest1"
|
44
|
-
git_current_branch.
|
31
|
+
expect(git_current_branch).to eq 'contest/contest1'
|
32
|
+
|
45
33
|
# Edit.1
|
46
34
|
File.open 'main.c', 'w' do |file|
|
47
35
|
file.write 'wa-code'
|
48
36
|
end
|
37
|
+
|
49
38
|
# Submit.1
|
50
39
|
bin_exec "submit test_dummy -c 1000 -p A"
|
51
40
|
ret = git_do "log --oneline"
|
52
|
-
ret.include
|
41
|
+
expect(ret).to include 'Dummy 1000A: Wrong Answer'
|
42
|
+
|
53
43
|
ret = git_do "ls-files"
|
54
|
-
ret.include
|
44
|
+
expect(ret).to include 'main.c'
|
45
|
+
|
55
46
|
# Edit.2 fixed
|
56
47
|
File.open 'main.c', 'w' do |file|
|
57
48
|
file.write 'ac-code'
|
58
49
|
end
|
50
|
+
|
59
51
|
# Submit.2
|
60
52
|
bin_exec "submit test_dummy -c 1000 -p A"
|
61
53
|
ret = git_do "log --oneline"
|
62
|
-
ret.include
|
54
|
+
expect(ret).to include 'Dummy 1000A: Accepted'
|
55
|
+
|
63
56
|
ret = git_do "ls-files"
|
64
|
-
ret.include
|
57
|
+
expect(ret).to include 'main.c'
|
58
|
+
|
65
59
|
# Finish
|
66
60
|
bin_exec "finish --no-edit"
|
67
|
-
git_current_branch.
|
61
|
+
expect(git_current_branch).to eq 'master'
|
62
|
+
|
68
63
|
ret = git_do "log --oneline"
|
69
|
-
ret.include
|
70
|
-
ret.include
|
71
|
-
# Clean
|
72
|
-
FileUtils.remove_dir '.git', :force => true
|
73
|
-
FileUtils.remove 'main.c'
|
74
|
-
Dir.chdir '..'
|
75
|
-
Dir.rmdir 'test1'
|
64
|
+
expect(ret).to include 'Dummy 1000A: Wrong Answer'
|
65
|
+
expect(ret).to include 'Dummy 1000A: Accepted'
|
76
66
|
end
|
77
|
-
|
78
67
|
end
|
79
|
-
|
80
68
|
end
|
81
|
-
|
82
69
|
end
|
83
70
|
|
@@ -1,42 +1,21 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe "T007: git-contest-start" do
|
4
|
-
|
5
|
-
before(:each) do
|
6
|
-
init_env
|
7
|
-
@test_dir = "#{ENV['GIT_CONTEST_TEMP_DIR']}/t007"
|
8
|
-
Dir.mkdir @test_dir
|
9
|
-
Dir.chdir @test_dir
|
10
|
-
# debug_on
|
11
|
-
end
|
12
|
-
|
13
|
-
after(:each) do
|
14
|
-
Dir.chdir '..'
|
15
|
-
FileUtils.remove_dir @test_dir, :force => true
|
16
|
-
end
|
17
|
-
|
18
|
-
describe "001: specify based branch" do
|
19
|
-
|
4
|
+
context "A001: specify based branch" do
|
20
5
|
before do
|
21
|
-
Dir.mkdir "001"
|
22
|
-
Dir.chdir "001"
|
23
6
|
bin_exec "init --defaults"
|
24
7
|
end
|
25
8
|
|
26
|
-
after do
|
27
|
-
Dir.chdir ".."
|
28
|
-
end
|
29
|
-
|
30
9
|
it "001" do
|
31
10
|
git_do "checkout -b base1"
|
32
11
|
git_do "commit --allow-empty -m 'this is commit'"
|
33
12
|
git_do "checkout master"
|
34
13
|
bin_exec "start test1"
|
35
14
|
ret1 = git_do "log --oneline"
|
36
|
-
ret1.include
|
15
|
+
expect(ret1).not_to include "this is commit"
|
37
16
|
bin_exec "start test2 base1"
|
38
17
|
ret2 = git_do "log --oneline"
|
39
|
-
ret2.include
|
18
|
+
expect(ret2).to include "this is commit"
|
40
19
|
end
|
41
20
|
|
42
21
|
it "002" do
|
@@ -45,10 +24,10 @@ describe "T007: git-contest-start" do
|
|
45
24
|
git_do "checkout master"
|
46
25
|
bin_exec "start test1 base1"
|
47
26
|
ret1 = git_do "log --oneline"
|
48
|
-
ret1.include
|
27
|
+
expect(ret1).to include "this is commit"
|
49
28
|
bin_exec "start test2"
|
50
29
|
ret2 = git_do "log --oneline"
|
51
|
-
ret2.include
|
30
|
+
expect(ret2).not_to include "this is commit"
|
52
31
|
end
|
53
32
|
|
54
33
|
it "003" do
|
@@ -56,10 +35,10 @@ describe "T007: git-contest-start" do
|
|
56
35
|
git_do "commit --allow-empty -m 'this is commit'"
|
57
36
|
bin_exec "start test1 base1"
|
58
37
|
ret1 = git_do "log --oneline"
|
59
|
-
ret1.include
|
38
|
+
expect(ret1).to include "this is commit"
|
60
39
|
bin_exec "start test2"
|
61
40
|
ret2 = git_do "log --oneline"
|
62
|
-
ret2.include
|
41
|
+
expect(ret2).not_to include "this is commit"
|
63
42
|
end
|
64
43
|
|
65
44
|
it "004" do
|
@@ -67,25 +46,14 @@ describe "T007: git-contest-start" do
|
|
67
46
|
git_do "commit --allow-empty -m 'this is commit'"
|
68
47
|
bin_exec "start test1"
|
69
48
|
ret1 = git_do "log --oneline"
|
70
|
-
ret1.include
|
49
|
+
expect(ret1).not_to include "this is commit"
|
71
50
|
bin_exec "start test2 base1"
|
72
51
|
ret2 = git_do "log --oneline"
|
73
|
-
ret2.include
|
52
|
+
expect(ret2).to include "this is commit"
|
74
53
|
end
|
75
|
-
|
76
54
|
end
|
77
55
|
|
78
|
-
|
79
|
-
|
80
|
-
before do
|
81
|
-
Dir.mkdir "002"
|
82
|
-
Dir.chdir "002"
|
83
|
-
end
|
84
|
-
|
85
|
-
after do
|
86
|
-
Dir.chdir ".."
|
87
|
-
end
|
88
|
-
|
56
|
+
context "A002: --fetch" do
|
89
57
|
it "001" do
|
90
58
|
Dir.mkdir "test1"
|
91
59
|
Dir.chdir "test1"
|
@@ -95,27 +63,26 @@ describe "T007: git-contest-start" do
|
|
95
63
|
Dir.chdir "test1"
|
96
64
|
10.times {|x| git_do "commit --allow-empty -m 'this is commit'" }
|
97
65
|
ret1 = git_do "log --oneline master"
|
66
|
+
expect(ret1).to include "this is commit"
|
67
|
+
|
98
68
|
Dir.chdir ".."
|
99
69
|
Dir.chdir "test2"
|
100
70
|
# init
|
101
71
|
bin_exec "init --defaults"
|
102
72
|
# fetch
|
103
73
|
ret2 = git_do "log --oneline origin/master"
|
74
|
+
expect(ret2).not_to include "this is commit"
|
75
|
+
|
104
76
|
ret_start1 = bin_exec "start branch1 --fetch"
|
77
|
+
expect(ret_start1).not_to include "Summary of actions:"
|
78
|
+
|
105
79
|
ret3 = git_do "log --oneline origin/master"
|
80
|
+
expect(ret3).to include "this is commit"
|
81
|
+
|
106
82
|
git_do "pull origin master"
|
107
83
|
ret_start2 = bin_exec "start branch2 --fetch"
|
108
|
-
|
109
|
-
ret1.include?("this is commit").should === true
|
110
|
-
ret2.include?("this is commit").should === false
|
111
|
-
ret3.include?("this is commit").should === true
|
112
|
-
ret_start1.include?("Summary of actions:").should === false
|
113
|
-
ret_start2.include?("Summary of actions:").should === true
|
114
|
-
# clean
|
115
|
-
Dir.chdir ".."
|
84
|
+
expect(ret_start2).to include "Summary of actions:"
|
116
85
|
end
|
117
|
-
|
118
86
|
end
|
119
|
-
|
120
87
|
end
|
121
88
|
|
@@ -3,31 +3,7 @@ require "spec_helper"
|
|
3
3
|
# Do not forget --no-edit option
|
4
4
|
|
5
5
|
describe "T008: git-contest-finish" do
|
6
|
-
|
7
|
-
before(:each) do
|
8
|
-
init_env
|
9
|
-
@test_dir = "#{ENV['GIT_CONTEST_TEMP_DIR']}/t008"
|
10
|
-
Dir.mkdir @test_dir
|
11
|
-
Dir.chdir @test_dir
|
12
|
-
# debug_on
|
13
|
-
end
|
14
|
-
|
15
|
-
after(:each) do
|
16
|
-
Dir.chdir '..'
|
17
|
-
FileUtils.remove_dir @test_dir, :force => true
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "001: --keep" do
|
21
|
-
|
22
|
-
before do
|
23
|
-
Dir.mkdir "001"
|
24
|
-
Dir.chdir "001"
|
25
|
-
end
|
26
|
-
|
27
|
-
after do
|
28
|
-
Dir.chdir ".."
|
29
|
-
end
|
30
|
-
|
6
|
+
context "A001: --keep" do
|
31
7
|
it "001: init -> start -> empty-commits -> finish" do
|
32
8
|
bin_exec "init --defaults"
|
33
9
|
bin_exec "start branch1"
|
@@ -35,8 +11,8 @@ describe "T008: git-contest-finish" do
|
|
35
11
|
bin_exec "finish --no-edit"
|
36
12
|
ret1 = git_do "branch"
|
37
13
|
ret_log1 = git_do "log --oneline master"
|
38
|
-
ret1.include
|
39
|
-
ret_log1.include
|
14
|
+
expect(ret1).not_to include "branch1"
|
15
|
+
expect(ret_log1).to include "this is commit"
|
40
16
|
end
|
41
17
|
|
42
18
|
it "002: init -> start -> empty-commits -> finish --keep" do
|
@@ -46,8 +22,8 @@ describe "T008: git-contest-finish" do
|
|
46
22
|
bin_exec "finish --no-edit --keep"
|
47
23
|
ret1 = git_do "branch"
|
48
24
|
ret_log1 = git_do "log --oneline master"
|
49
|
-
ret1.include
|
50
|
-
ret_log1.include
|
25
|
+
expect(ret1).to include "branch1"
|
26
|
+
expect(ret_log1).to include "this is commit"
|
51
27
|
end
|
52
28
|
|
53
29
|
it "003: init -> start -> empty-commits -> finish -k" do
|
@@ -57,23 +33,13 @@ describe "T008: git-contest-finish" do
|
|
57
33
|
bin_exec "finish --no-edit -k"
|
58
34
|
ret1 = git_do "branch"
|
59
35
|
ret_log1 = git_do "log --oneline master"
|
60
|
-
ret1.include
|
61
|
-
ret_log1.include
|
36
|
+
expect(ret1).to include "branch1"
|
37
|
+
expect(ret_log1).to include "this is commit"
|
62
38
|
end
|
63
39
|
|
64
40
|
end
|
65
41
|
|
66
|
-
|
67
|
-
|
68
|
-
before do
|
69
|
-
Dir.mkdir "002"
|
70
|
-
Dir.chdir "002"
|
71
|
-
end
|
72
|
-
|
73
|
-
after do
|
74
|
-
Dir.chdir ".."
|
75
|
-
end
|
76
|
-
|
42
|
+
context "A002: --rebase" do
|
77
43
|
it "001: init -> start -> empty-commits -> finish --rebase" do
|
78
44
|
# create branches: branch1(normal) -> branch2(rebase) -> branch3(normal)
|
79
45
|
bin_exec "init --defaults"
|
@@ -105,28 +71,18 @@ describe "T008: git-contest-finish" do
|
|
105
71
|
bin_exec "finish branch3 --no-edit"
|
106
72
|
ret_branch_2 = git_do "branch"
|
107
73
|
ret_log = git_do "log --oneline"
|
108
|
-
ret_branch_1.include
|
109
|
-
ret_branch_1.include
|
110
|
-
ret_branch_1.include
|
111
|
-
ret_branch_2.include
|
112
|
-
ret_branch_2.include
|
113
|
-
ret_branch_2.include
|
74
|
+
expect(ret_branch_1).to include "branch1"
|
75
|
+
expect(ret_branch_1).to include "branch2"
|
76
|
+
expect(ret_branch_1).to include "branch3"
|
77
|
+
expect(ret_branch_2).not_to include "branch1"
|
78
|
+
expect(ret_branch_2).not_to include "branch2"
|
79
|
+
expect(ret_branch_2).not_to include "branch3"
|
114
80
|
(!!ret_log.match(/test-2.*test-3.*test-1/m)).should === true
|
115
81
|
end
|
116
82
|
|
117
83
|
end
|
118
84
|
|
119
|
-
|
120
|
-
|
121
|
-
before do
|
122
|
-
Dir.mkdir "003"
|
123
|
-
Dir.chdir "003"
|
124
|
-
end
|
125
|
-
|
126
|
-
after do
|
127
|
-
Dir.chdir ".."
|
128
|
-
end
|
129
|
-
|
85
|
+
context "A003: --force-delete" do
|
130
86
|
# TODO: recheck
|
131
87
|
it "001: init -> start -> trigger merge error -> finish --force-delete" do
|
132
88
|
# make conflict
|
@@ -152,23 +108,12 @@ describe "T008: git-contest-finish" do
|
|
152
108
|
bin_exec "finish branch1 --no-edit"
|
153
109
|
bin_exec "finish branch2 --force-delete --no-edit"
|
154
110
|
ret_branch = git_do "branch"
|
155
|
-
ret_branch.include
|
156
|
-
ret_branch.include
|
111
|
+
expect(ret_branch).not_to include "contest/branch1"
|
112
|
+
expect(ret_branch).not_to include "contest/branch2"
|
157
113
|
end
|
158
|
-
|
159
114
|
end
|
160
115
|
|
161
|
-
|
162
|
-
|
163
|
-
before do
|
164
|
-
Dir.mkdir "004"
|
165
|
-
Dir.chdir "004"
|
166
|
-
end
|
167
|
-
|
168
|
-
after do
|
169
|
-
Dir.chdir ".."
|
170
|
-
end
|
171
|
-
|
116
|
+
context "A004: --squash" do
|
172
117
|
it "001: init -> start -> empty-commits -> finish --squash" do
|
173
118
|
bin_exec "init --defaults"
|
174
119
|
bin_exec "start branch1"
|
@@ -181,18 +126,14 @@ describe "T008: git-contest-finish" do
|
|
181
126
|
bin_exec "finish --no-edit --squash branch1"
|
182
127
|
ret_log1 = git_do "log --oneline"
|
183
128
|
ret_branch1 = git_do "branch"
|
184
|
-
ret_branch1.include
|
185
|
-
ret_log1.include
|
186
|
-
ret_log1.include
|
129
|
+
expect(ret_branch1).not_to include "branch1"
|
130
|
+
expect(ret_log1).to include "this is commit"
|
131
|
+
expect(ret_log1).to include "Squashed commit"
|
187
132
|
end
|
188
|
-
|
189
133
|
end
|
190
134
|
|
191
|
-
|
192
|
-
|
135
|
+
context "A005: --fetch" do
|
193
136
|
before do
|
194
|
-
Dir.mkdir "005"
|
195
|
-
Dir.chdir "005"
|
196
137
|
Dir.mkdir "src"
|
197
138
|
Dir.chdir "src"
|
198
139
|
bin_exec "init --defaults"
|
@@ -200,15 +141,9 @@ describe "T008: git-contest-finish" do
|
|
200
141
|
10.times {|x| git_do "commit --allow-empty -m 'this is commit #{x}'" }
|
201
142
|
Dir.chdir ".."
|
202
143
|
git_do "clone src dest"
|
203
|
-
|
204
144
|
Dir.chdir "dest"
|
205
145
|
end
|
206
146
|
|
207
|
-
after do
|
208
|
-
Dir.chdir ".."
|
209
|
-
Dir.chdir ".."
|
210
|
-
end
|
211
|
-
|
212
147
|
it "001: init -> start -> clone -> checkout@dest -> empty-commits@dest -> finish@dest" do
|
213
148
|
git_do "checkout -b master origin/master"
|
214
149
|
bin_exec "init --defaults"
|
@@ -219,11 +154,9 @@ describe "T008: git-contest-finish" do
|
|
219
154
|
Dir.chdir "src"
|
220
155
|
ret_branch1 = git_do "branch"
|
221
156
|
git_do "checkout master"
|
222
|
-
ret_branch1.include
|
223
|
-
ret_branch2.include
|
157
|
+
expect(ret_branch1).to include 'branch1'
|
158
|
+
expect(ret_branch2).not_to include 'branch1'
|
224
159
|
end
|
225
|
-
|
226
160
|
end
|
227
|
-
|
228
161
|
end
|
229
162
|
|
@@ -3,44 +3,18 @@ require "spec_helper"
|
|
3
3
|
# Don't forget --defaults option
|
4
4
|
|
5
5
|
describe "T009: git-contest-init" do
|
6
|
-
|
7
|
-
before do
|
8
|
-
init_env
|
9
|
-
@test_dir = "#{ENV['GIT_CONTEST_TEMP_DIR']}/t009"
|
10
|
-
Dir.mkdir @test_dir
|
11
|
-
Dir.chdir @test_dir
|
12
|
-
# debug_on
|
13
|
-
end
|
14
|
-
|
15
|
-
after do
|
16
|
-
Dir.chdir '..'
|
17
|
-
Dir.rmdir @test_dir
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "001: --force" do
|
21
|
-
before do
|
22
|
-
Dir.mkdir "001"
|
23
|
-
Dir.chdir "001"
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
FileUtils.remove_dir ".git", :force => true
|
28
|
-
Dir.chdir ".."
|
29
|
-
Dir.rmdir "001"
|
30
|
-
end
|
31
|
-
|
6
|
+
context "A001: --force" do
|
32
7
|
it "001: init -> init" do
|
33
8
|
ret1 = bin_exec "init --defaults"
|
34
9
|
ret_config1 = git_do("config --get git.contest.branch.master")
|
35
10
|
ret2 = bin_exec "init --defaults"
|
36
|
-
|
37
11
|
ret_config1.should === "master"
|
38
|
-
ret1.include
|
39
|
-
ret2.include
|
40
|
-
ret1.include
|
41
|
-
ret1.include
|
42
|
-
ret2.include
|
43
|
-
ret2.include
|
12
|
+
expect(ret1).not_to include "Error: unknown argument"
|
13
|
+
expect(ret2).not_to include "Error: unknown argument"
|
14
|
+
expect(ret1).not_to include "Already initialized for git-contest."
|
15
|
+
expect(ret1).not_to include "use: git contest init -f"
|
16
|
+
expect(ret2).to include "Already initialized for git-contest."
|
17
|
+
expect(ret2).to include "use: git contest init -f"
|
44
18
|
end
|
45
19
|
|
46
20
|
it "002: init -> init -f -> init --force" do
|
@@ -49,15 +23,15 @@ describe "T009: git-contest-init" do
|
|
49
23
|
ret2 = bin_exec "init --defaults -f"
|
50
24
|
ret3 = bin_exec "init --defaults --force"
|
51
25
|
ret_config1.should === "master"
|
52
|
-
ret1.include
|
53
|
-
ret2.include
|
54
|
-
ret3.include
|
55
|
-
ret1.include
|
56
|
-
ret1.include
|
57
|
-
ret2.include
|
58
|
-
ret2.include
|
59
|
-
ret3.include
|
60
|
-
ret3.include
|
26
|
+
expect(ret1).not_to include "Error: unknown argument"
|
27
|
+
expect(ret2).not_to include "Error: unknown argument"
|
28
|
+
expect(ret3).not_to include "Error: unknown argument"
|
29
|
+
expect(ret1).not_to include "Already initialized for git-contest."
|
30
|
+
expect(ret1).not_to include "use: git contest init -f"
|
31
|
+
expect(ret2).not_to include "Already initialized for git-contest."
|
32
|
+
expect(ret2).not_to include "use: git contest init -f"
|
33
|
+
expect(ret3).not_to include "Already initialized for git-contest."
|
34
|
+
expect(ret3).not_to include "use: git contest init -f"
|
61
35
|
end
|
62
36
|
|
63
37
|
it "003: init -f -> init -f -> init --force" do
|
@@ -66,17 +40,16 @@ describe "T009: git-contest-init" do
|
|
66
40
|
ret2 = bin_exec "init --defaults -f"
|
67
41
|
ret3 = bin_exec "init --defaults --force"
|
68
42
|
ret_config1.should === "master"
|
69
|
-
ret1.include
|
70
|
-
ret2.include
|
71
|
-
ret3.include
|
72
|
-
ret1.include
|
73
|
-
ret1.include
|
74
|
-
ret2.include
|
75
|
-
ret2.include
|
76
|
-
ret3.include
|
77
|
-
ret3.include
|
43
|
+
expect(ret1).not_to include "Error: unknown argument"
|
44
|
+
expect(ret2).not_to include "Error: unknown argument"
|
45
|
+
expect(ret3).not_to include "Error: unknown argument"
|
46
|
+
expect(ret1).not_to include "Already initialized for git-contest."
|
47
|
+
expect(ret1).not_to include "use: git contest init -f"
|
48
|
+
expect(ret2).not_to include "Already initialized for git-contest."
|
49
|
+
expect(ret2).not_to include "use: git contest init -f"
|
50
|
+
expect(ret3).not_to include "Already initialized for git-contest."
|
51
|
+
expect(ret3).not_to include "use: git contest init -f"
|
78
52
|
end
|
79
53
|
end
|
80
|
-
|
81
54
|
end
|
82
55
|
|