質問編集履歴

2

パスの追加

2019/05/08 20:22

投稿

shumbow
shumbow

スコア35

test CHANGED
File without changes
test CHANGED
@@ -110,6 +110,8 @@
110
110
 
111
111
  一応関連するtestファイルも載せておきます。
112
112
 
113
+ integration/users_login_test.rb
114
+
113
115
  ```integration/users_login_test.rb
114
116
 
115
117
  test "login with remembering" do

1

体裁を整えるため

2019/05/08 20:21

投稿

shumbow
shumbow

スコア35

test CHANGED
File without changes
test CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
 
4
4
 
5
- エラー箇所
5
+ エラー箇所 ターミナル
6
6
 
7
- ```ターミナル
7
+ ```
8
8
 
9
9
  $be rails test
10
10
 
@@ -46,43 +46,11 @@
46
46
 
47
47
  ここでtest_helper.rbのコードを自分で打ち込まずにコピペするとテストが通るので、ここのコードが原因だと思うのですが、30分ほど見比べても構文的にどこがおかしいのかわかりません・・・。
48
48
 
49
-
50
-
51
- ```自分のtest_helper.rb
49
+ 手打ちのtest_helper.rb
52
-
53
- ENV['RAILS_ENV'] ||= 'test'
54
-
55
- require File.expand_path('../../config/environment', __FILE__)
56
-
57
- require 'rails/test_help'
58
-
59
- require "minitest/reporters"
60
-
61
- Minitest::Reporters.use!
62
50
 
63
51
 
64
52
 
65
- class ActiveSupport::TestCase
66
-
67
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
68
-
69
- fixtures :all
70
-
71
- def is_logged_in?
72
-
73
- !session[:user_id].nil?
74
-
75
- end
53
+ ```
76
-
77
-
78
-
79
- def log_in_as(user)
80
-
81
- session[:user_id] = user.id
82
-
83
- end
84
-
85
- end
86
54
 
87
55
 
88
56
 
@@ -110,41 +78,9 @@
110
78
 
111
79
  ```
112
80
 
113
- ```コピペしたtest_helper.rb
81
+ コピペしたtest_helper.rb
114
82
 
115
- ENV['RAILS_ENV'] ||= 'test'
116
-
117
- require File.expand_path('../../config/environment', __FILE__)
118
-
119
- require 'rails/test_help'
120
-
121
- require "minitest/reporters"
122
-
123
- Minitest::Reporters.use!
124
-
125
-
126
-
127
- class ActiveSupport::TestCase
128
-
129
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
130
-
131
- fixtures :all
132
-
133
- def is_logged_in?
134
-
135
- !session[:user_id].nil?
136
-
137
- end
83
+ ```
138
-
139
-
140
-
141
- def log_in_as(user)
142
-
143
- session[:user_id] = user.id
144
-
145
- end
146
-
147
- end
148
84
 
149
85
 
150
86