samedi 31 octobre 2015

Strange activity with Ruby on Rails

I have created a small app with Ruby on Rails, and testing the app output three errors. However, these errors seem irregular. For instance, each of the errors asks me to insert a parenthesis where one is not needed in the line of the source code file at all. This is the set of errors:

         1) Error:
 StaticPagesControllerTest#test_should_get_about:
 SyntaxError: C:/Sites/sample_app/app/views/static_pages/about.html.erb:1:      syntax error, unexpected ',', expecting ')'
 ...putBuffer.new; provide (:title, "About")
 ...                               ^
 C:/Sites/sample_app/app/views/static_pages/about.html.erb:1: syntax error,    unexpected ')', expecting keyword_end
 ....new; provide (:title, "About")
 ...                               ^
 test/controllers/static_pages_controller_test.rb:17:in `block in   <class:StaticPagesControllerTest>'


         2) Error:
 StaticPagesControllerTest#test_should_get_help:
 SyntaxError: C:/Sites/sample_app/app/views/static_pages/help.html.erb:1:    syntax error, unexpected ',', expecting ')'
 ...putBuffer.new; provide (:title, "Help")
 ...                               ^
 C:/Sites/sample_app/app/views/static_pages/help.html.erb:1: syntax error,   unexpected ')', expecting keyword_end
 ...r.new; provide (:title, "Help")
 ...                               ^
 test/controllers/static_pages_controller_test.rb:11:in `block in <class:StaticPagesControllerTest>'


         3) Error:
 StaticPagesControllerTest#test_should_get_home:
 SyntaxError: C:/Sites/sample_app/app/views/static_pages/home.html.erb:1:   syntax error, unexpected ',', expecting ')'
 ...putBuffer.new; provide (:title, "Home")
 ...                               ^
 C:/Sites/sample_app/app/views/static_pages/home.html.erb:1: syntax error,    unexpected ')', expecting keyword_end
 ...r.new; provide (:title, "Home")
 ...                               ^
 test/controllers/static_pages_controller_test.rb:5:in `block in   <class:StaticPagesControllerTest>'

How can I correct this in the program, if it is needed? Is it even something on my side of the program?

Aucun commentaire:

Enregistrer un commentaire