[Exercise/7.3-4] Refactor and add test for post-signup flash message #13

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@hanazuki
Owner
  • Add flash_message class to the flash messages so that the presence of the messages can be easily tested in integration tests.
  • Refactor the view using content_tag instead of writing raw HTML tags.
  • Update the integration test for valid sign-up process so that it checks the presence of a "Welcome" flash message.

In Listing 7.33 on the Tutorial, we test that the controller gives a flash after valid sign-up process.
This is, however, insufficient to guarantee the correctness of refactoring of the view (Listing 7.34).
Instead, in this PR, we have a test to check that a flash message is correctly rendered.

@hanazuki Refactor and add test for post-signup flash message
Add `flash_message` class to the flash messages so that
the presence of the messages can be tested in integration tests.
e0e57ca
@hanazuki hanazuki added the exercise label Jun 12, 2015
@Joe-noh
Joe-noh commented Jun 12, 2015

flash_messageクラスの導入でテストが簡単になるのは良いことだけど、「デザインあたってないけど消すとテスト落ちるCSSクラス」があるのはいかがなものだろうか

@hanazuki
Owner

@Joe-noh HTMLのclass属性は,本来的には文書の構造を明示するためのものであって,デザインのためのものではないとおもいます!

@Joe-noh
Joe-noh commented Jun 12, 2015

なるほ。考えに基づいているのならよい!!

@hanazuki
Owner

🙇

@hanazuki hanazuki closed this Jun 15, 2015
@hanazuki hanazuki deleted the exercise/7.3 branch Jun 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment