LoginSignup
0
0

More than 3 years have passed since last update.

Ruby on Rails 第3章 3.31で rails testでエラーで嵌まる

Posted at

rails test で下記エラーが発生し少し嵌まった

原因はapp/views/static_pages/home.html.erbの
4行目の

<%= yield(:title) %> |の部分
%> |が 空白が1文字入っていて %> |
になっていたところ
プログラム的にはなにがおかしいのかまだ理解できないが
空白をひとつ削ったら正常な動作になった

$ rails test
Run options: --seed 51555

Running:

..F

Failure:
StaticPagesControllerTest#test_should_get_home [C:/Users/user/environment/samp_app/test/controllers/static_pages_controller_test.rb:11]:
expected but was
..
Expected 0 to be >= 1.

bin/rails test test/controllers/static_pages_controller_test.rb:8

.

Finished in 0.998276s, 4.0069 runs/s, 7.0121 assertions/s.
4 runs, 7 assertions, 1 failures, 0 errors, 0 skips

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0