質問編集履歴

1

文の修正

2021/08/03 15:53

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -96,7 +96,7 @@
96
96
 
97
97
  class GateTest < Minitest::Test
98
98
 
99
- def test_umeda_to_mikuni_when_fare_is_not_enough
99
+ def test_gate
100
100
 
101
101
  umeda = Gate.new(:umeda)
102
102
 
@@ -108,7 +108,25 @@
108
108
 
109
109
  umeda.enter(ticket)
110
110
 
111
+ assert juso.exit(ticket)
112
+
113
+ end
114
+
115
+
116
+
117
+ def test_umeda_to_mikuni_when_fare_is_not_enough
118
+
119
+ umeda = Gate.new(:umeda)
120
+
121
+ mikuni = Gate.new(:mikuni)
122
+
123
+
124
+
125
+ ticket = Ticket.new(150)
126
+
127
+ umeda.enter(ticket)
128
+
111
- refute juso.exit(ticket)
129
+ refute mikuni.exit(ticket)
112
130
 
113
131
  end
114
132
 
@@ -124,7 +142,7 @@
124
142
 
125
143
 
126
144
 
127
- Run options: --seed 57778
145
+ un options: --seed 12011
128
146
 
129
147
 
130
148
 
@@ -132,27 +150,39 @@
132
150
 
133
151
 
134
152
 
135
- E
153
+ EE
136
154
 
137
155
 
138
156
 
139
- Finished in 0.002319s, 431.2204 runs/s, 0.0000 assertions/s.
157
+ Finished in 0.003171s, 630.6363 runs/s, 0.0000 assertions/s.
140
158
 
141
159
 
142
160
 
143
161
  1) Error:
144
162
 
145
- GateTest#test_umeda_to_mikuni_when_fare_is_not_enough:
163
+ GateTest#test_gate:
146
164
 
147
- NoMethodError: undefined method `stamp' for #<Ticket:0x000001c648fe0488 @fare=150>
165
+ NoMethodError: undefined method `stamp' for #<Ticket:0x000001c9a6087db8 @fare=150>
148
166
 
149
167
  C:/Users/???/OneDrive/ドキュメント/furiRuby/lib/gate.rb:8:in `enter'
150
168
 
151
- test_gate.rb:11:in `test_umeda_to_mikuni_when_fare_is_not_enough'
169
+ test_gate.rb:11:in `test_gate'
152
170
 
153
171
 
154
172
 
173
+ 2) Error:
174
+
175
+ GateTest#test_umeda_to_mikuni_when_fare_is_not_enough:
176
+
177
+ NoMethodError: undefined method `stamp' for #<Ticket:0x000001c9a6014570 @fare=150>
178
+
179
+ C:/Users/???/OneDrive/ドキュメント/furiRuby/lib/gate.rb:8:in `enter'
180
+
181
+ test_gate.rb:20:in `test_umeda_to_mikuni_when_fare_is_not_enough'
182
+
183
+
184
+
155
- 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
185
+ 2 runs, 0 assertions, 0 failures, 2 errors, 0 skips
156
186
 
157
187
 
158
188