By David Heinemeier Hansson on November 9, 2009 ActionMailers has to deal with a bit of a split personality. On the one hand, their organization and flow structure is very much akin to controllers. They have multiple methods that all correspond to actions. They render views from templates. They can even have layouts. On the other hand, Rails by default puts them in app/models. Looking at these two
ãã¹ã¯ã¼ããå¿ããéã®ãã¹ã¯ã¼ãåè¨å®æä½ã®ãã¹ãã Cucumber ã§æ¸ãã¦ã¿ã¾ããã UK STUDIOããã°ã® Cucumber+email_specã§ActionMailerã®ãã¹ãããã ã«æ¸ããã¦ããããã« Cucumber ã¯ã¡ã¼ã«ãå«ãä¸é£ã®æä½ããã¹ãã§ãã¾ãã ã¤ã³ã¹ãã¼ã«ã¨åæè¨å® ã¡ã¼ã«ã®ãã¹ããè¡ããã©ã°ã¤ã³ Email Spec ãã¤ã³ã¹ãã¼ã«ãã¾ãã gem install bmabey-email_specfeatures/support/env.rb ã«ä»¥ä¸ã追å ãã¾ããGitHubã«æ¸ããã¦ããã ãã§ã¯ã¨ã©ã¼ã«ãªã£ã¦ãã¾ãã¾ããã require 'email_spec' require 'email_spec/cucumber' cd Railsããã¸ã§ã¯ã script/generate email_spec 2009/10/30 追å email
ä»ã¾ã§ã¡ã¼ã«(ActionMailer)ã®ãã¹ãã¯ã©ãã«ãé¢åã§ãèªåã§ãã©ã¦ã¶ããåããã¦ãã°ãè¦ã¦ã£ã¦ãã£ã¦ãããã§ãããCucumberã§ã¡ã¼ã«ã®ãã¹ããã§ããã£ã½ãã®ã§è©¦ãã¦ã¿ã¾ããã 確èªç°å¢ã¯Rails2.3.2ãCucumber0.2.3ãemail_spec0.0.10ã email_specã¯githubãsourceã«æå®ãã¦ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ãã¾ã(bmabeyâs email-spec at master - GitHub)ãconfig/environments/test.rbãããã«æ¸ãã¦ããã¨ããã¨æãã¾ãã email_specãã¤ã³ã¹ãã¼ã«ããã¨generateã«ã³ãã³ãã追å ããã¦ãã¾ãã $ ruby script/generate email_spec ããã§çæãããfeatures/stepdefinitions/emailsteps.rb
restful_authentication ã®å°å ¥æã« èªè¨¼ã¡ã¼ã«ã®éä¿¡ãã¹ã㧠ã¡ã¼ã«ã¢ã«ã¦ã³ããæã£ã¦ãããµã¼ãã¹ãå¹¾ã¤ã試ãã¦ã¿ãã 試ããã®ã¯ä¸è¨ã ã»Yahoo!ã¡ã¼ã« : ãã°ã¤ã³èªè¨¼ ã»GMail : TLS ã»ããªããã : POP before SMTP ã¨ããã©ã¨ãã£ã«å¯ãã§ãã¦ãµã³ãã«ã« ã¡ããã©ããæãã ã£ãã®ã§ãã¡ã¢ãæ®ãã¦ããã¾ãã yahoo!ã¡ã¼ã« ç¹ã«å¤ãã£ããã¨ãããå¿ è¦ããªãã ActionMailerã®è¨å®ã®ã¿ã§ããã¾ãã config/environment.rb Rails::Initializer.run do |config| ... config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => 'smtp.ma
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}