`
ywencn
  • 浏览: 85221 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

BDD on rails 过程

阅读更多

• Start with a scenario. Make sure you have a clear understanding
of the scenario and how it is expected to work, including how the
UI should support a user interacting with the app 。

 

从一个场景开始。确保你对这个场景有一个清晰的了解,知道它预期将怎样工作,

包括UI将为这个应用提供一个怎样的用户界面。


• Execute the scenario with Cucumber. This reveals which steps are
pending. Most, if not all of the steps will be pending at first.

 

用Cucumber运行这个场景。它会显示那些步骤处于带解决的状态。


• Write a step definition for the first step. Execute the scenario with
Cucumber and watch it fail.

 

 

为第一步写步骤定义。使用Cucumber运行这个场景,看它的错误信息。

 

• Drive out the view implementation using the red/green/refactor
cycle with RSpec. You’ll discover assigned instance variables, controllers,
controller actions, and models that the view will need in
order to do its job.

 

使用RSpec红、绿、重构循环驱动视图的实现。

通过这项工作你可以找到视图需要的实例变量、控制器、控制器动作、和模型。


• Drive out the controller with RSpec, ensuring that the instance
variables are properly assigned. With the controller in place you’ll
know what models it needs to do its job.

 

使用RSpec驱动控制器,确保实例变量正确赋值。控制器到位后,你就会找到完成它需要哪些模型。


• Drive out those objects with RSpec, ensuring that they provide the
methods needed by the view and the controller. This typically leads
to generating the required migrations for fields in the database.

 

使用Rspec来驱动那些对象,确保他们提供了视图和控制器需要的方法。

这样就可以找到需要数据迁移的那些字段了。


• Once you have implemented all of the objects and methods that
you have discovered are needed, execute the scenario with Cucumber
again to make sure the step is satisfied.

 

一旦你完成了你需要的所有对象和方法,再次使用Cucumber运行那个场景,确保这个步骤的完成。

 

 

0
0
分享到:
评论

相关推荐

    Rails 3 in Action

    Ruby on Rails应该不用多说了吧,Web领域敏捷开发最有竞争力的框架。

    使用Cucumber+Rspec玩转BDD(1)——用户注册

    ruby on rails 的测试工具,敏捷开发工具。。。。

    jungle-rails:用Rails 4.2构建的一个小型电子商务应用程序,用于通过示例学习Rails的目的

    由于这个项目,我了解了有关Ruby on Rails,模型-视图-控制器范例,嵌入式Ruby和测试(TDD和BDD)的更多信息。笔记: 已知问题:来宾(未经身份验证)用户仍然可以下订单。 下一步,应禁用此选项。主页管理员类别...

    CukeForce:Cucumber with Capybara for BDD in Salesforce

    确保您已安装 Ruby on Rails、Cucumber 和 Capybara -目前仅支持 Ruby 1.9.3 for Windows下面是关于安装 Cucumber for windows 的一些优秀说明 如果您收到 SSL 认证错误,请参阅此博客, 确保安装了 Selenium ...

    workout-app:使用rspec的Rails课程的健身应用程序

    这是在udemy上使用带有RSpec和Capybara课程的Ruby on Rails的BDD的github存储库

    R软件代码转换为matlab-CV:我的个人简历

    Academy,以更新有关编程实践的现有技能,并加快学习过程。 技能 TDD,BDD,Scrum等敏捷方法 面向对象的程序设计 Ruby 配对编程 Ruby on Rails 西纳特拉 许多Ruby-Gems,包括Devise,Bcrypt,Paperclip 对象关系映射...

    qna:学习副本 StackOverflow.com

    作为 Thinknetica 学校“Ruby on Rails 专业开发”课程的一部分 已完成题目: 敏捷开发流程 Git流程 Rails 哲学 带有 RSpec 的 TDD / BDD 集成测试 内部回报率 HAML / Slim、SCSS、CoffeeScript 后台任务 按计划...

    dailyrails-rspec-2017:使用RSpec的Everyday Rails Testing 2017版的样本源

    使用RSpec的样例应用程序进行日常Rails测试(2017版) 请参阅博客,以获取有关此版图书的新闻。 您可以在GitHub的找到早期版本的示例源。 谢谢! 进行示例Rails 5.1应用程序: Aaron Sumner进行测试驱动开发的实用...

    chrismontes.com

    Ruby On Rails 2014 年冬季作品集我的作品集网站使用 Rails、BDD、Zepto、Foundation 和 Unicorn Tears 构建截图特色资源查看网站: : 通过 LinkedIn 与我联系

    jenvi:Jenkins构建管道可视化

    jslint_on_rails宝石 茉莉(JavaScript的BDD)gem 捆绑宝石 当然还有要引用的Jenkins服务器:Jenkins(CI Server) 用途: jQuery- 使用Javascript Infovis工具包- 构建/测试: $耙 跑步: $耙运行 浏览到 ...

    Knockout API 中文版

    Comprehensive suite of specifications - (developed BDD-style) means its correct functioning can easily be verified on new browsers and platforms 开发人员如果用过Silverlight或者WPF可能会知道KO是MVVM...

Global site tag (gtag.js) - Google Analytics