cost 497 ms
rspec email_spec和jobs ..它是如何工作的? 我想检查信件是否已发送..也许是电子邮件正文 - rspec email_spec and jobs.. how does it work? I want to check whether the letter was sent.. and maybe email body

我有'controllers / users_controller.rb' 我有'mailers / user_mailer.rb' 我有'jobs / email_send_job.rb' 我该如何进行测试? 谢谢 我看到'email-spec',但我的代码无法 ...

有没有一种方法可以跟踪基于email_spec中文本的链接? - Is there a way to follow a link based in its text in email_spec?

在RSpec中,我可以使用以下命令轻松地跟踪与某些文本对应的链接 然后,RSpec将找到适当的链接并遵循相关的HREF。 您如何通过电子邮件做到这一点? 我正在尝试使用email_spec在电子邮件中执行相同的行为。 但是我似乎找不到等效的助手,该助手将单击与email_s ...

Rails测试环境:为什么ActionMailer需要default_url_options? - Rails test env: why does it need default_url_options for ActionMailer?

为什么测试环境需要为ActionMailer设置default_url_options? 如果未设置,则在执行规格时会得到以下提示: 我特别想知道,因为设置 那么从理论上讲,电子邮件中的链接将导致localhost:3000,据我所知,这不是测试服务器实例真正在哪里运行的? ...

安装email_spec后如何解决gem依赖项冲突 - How to resolve a gem dependency conflict after installing email_spec

我只是根据自述文件中的说明安装了与rspec一起使用的email-spec。 现在,当我尝试运行测试时(即使未在规范中使用电子邮件规范的方法),也会出现此错误: 预先安装的bundle exec将使测试运行正常(我仍然Neither Pony nor ActionMailer appe ...

Capybara + rspec:Reset_Password路由错误 - Capybara+rspec:Reset_Password routing error

所以我正在尝试测试忘记密码的简单功能。我是新手,如果这是一个愚蠢的问题,请原谅。 在这里,我必须以forgot_password形式输入用户电子邮件,该电子邮件向我发送电子邮件中的链接以重置密码。 我正在到达电子邮件内部,但是当它单击链接时,页面最终显示在错误页面上 这是我的spe ...

使用 rspec、capybara 和 email_spec 设计密码恢复的集成测试 - integration tests for devise password recovery using rspec, capybara and email_spec

我正在尝试使用 rspec/capybara 使用 email_spec 测试密码恢复 我的 test.rb 包含: 我的测试是这样的: 我的测试失败了: 如果我设置了 default_url_options,rspec 会尝试发送邮件。 我不太确定:only_path。 任何人都可以 ...

如何在纯文本电子邮件中传递长URL? - How to pass long URL in plain text emails?

我收到此帐户创建电子邮件,该电子邮件已发送给尝试创建帐户的任何人,因为我需要验证他们是否像他们所说的那样。 但是,我的问题是,他们收到我的电子邮件时需要单击的URL太长,某些电子邮件客户端不能很好地处理该URL,有时会截断该URL,从而使该URL在单击时无效。 由于URL包含域名,哈 ...

2012-02-20 16:53:19   1   843    email-spec  
使用email_spec进行的电子邮件传递测试在Rails 3.0.11-> 3.1.3上中断 - Email delivery testing with email_spec breaks on Rails 3.0.11 -> 3.1.3

我正在将Rails 3.0.11应用程序迁移到3.1.3。 某种程度上,这打破了使用黄瓜+硒设置时收到的电子邮件数量的email_spec测试。 config.action_mailer.delivery_method = :test ,也曾尝试过:cache和:file传递方法。 无 ...

如何使用rspec在Sinatra应用程序中测试Pony电子邮件? - How do I test Pony emailing in a Sinatra app, using rspec?

我正在尝试email_spec ,它说它支持Pony,但是我不确定如何在sinatra应用程序中测试电子邮件。 自述文件中的示例显示了Rails ActionMailer用法,但未显示在Pony中。 对于使用email_spec并不珍贵,因此欢迎在sinatra中使用rspec测试电子邮 ...

Cucumber / Capybara / Email Spec无法正常使用Selenium Driver - Cucumber/Capybara/Email Spec not working correctly with Selenium Driver

我正在进行一些Cucumber / Capybara测试。 我一直在使用email_spec gem检查电子邮件的内容。 某些'和'someone@email.com“应该接收电子邮件的步骤。 当我使用rack_test驱动程序运行测试时,它们没有问题。 但是,使用selenium驱动程 ...

如何测试 - 使用 rspec - 创建 email 时使用什么模板? (轨道 3.0.7) - How to test - with rspec - what template is used when creating an email? (Rails 3.0.7)

我正在尝试为使用 rspec 和 email_spec (Ruby on Rails 3.0.7)的邮件程序 class 生成的电子邮件编写一些测试我想检查用于渲染 email 的布局是否是邮件 class 中指定的布局。 关于如何做到这一点的任何想法? 我花了 3 个小时寻找解决方案,但找不到任 ...

如何使用黄瓜测试基于延迟工作的功能集成? - How to do test integration of features based on delayed jobs with cucumber?

我想在黄瓜上测试一些需要延迟工作才能正常工作的功能。 我定义了以下步骤: 目前,我正在尝试测试电子邮件通知。 所以我有以下情况: 应接收n个电子邮件的步骤由email_spec定义,并定义为: 因此,测试无法告诉我我收到0封电子邮件(在此测试中,test @ test ...

电子邮件规范与Rails中的正文内容不匹配 - Email spec doesn't match body content in Rails

我正在使用email_spec gem来测试一个简单的电子邮件,但由于某种原因,正文内容似乎是空的: 其他每个例子都过去了 模板文件名为welcome_email.text.erb 。 不确定为什么身体不匹配,但电子邮件在发送时确实有一个正文。 编辑:Rspec代码是: ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM