Beginner question about Turnip and why use it....

已查看 28 次
跳至第一个未读帖子

Sharon Snyder

未读,
2015年7月6日 23:21:172015/7/6
收件人 ruby-...@googlegroups.com
Please forgive this very basic/poorly written question....

I have been handed an existing Ruby on Rails project (currently used by about 50 folks daily) with a large number of rspec and cucumber tests.  I love the readability of the cucumber scripts, and find rspec much harder to read/maintain. I'm an experienced developer - with other languages - not necessarily a web background but I have worked a bit with ASP.NET and Django over the last few years, so I love having these tests.

My question is really why should I add Turnip and potentially start to re-write my rspec tests - besides the potential readability gain. I like the idea of rspec being more the unit testing, and cucumber being more the behavior and integration testing....this forces me to actually write both types of tests in my pseudo-TDD environment.  It's not a true TDD environment - but moving towards this.

Exactly what is considered "best practices" for my situation?

Thanks,
Sharon

Wataru MIYAGUNI

未读,
2015年7月8日 08:45:562015/7/8
收件人 ruby-...@googlegroups.com
Hi Sharon


> Exactly what is considered "best practices" for my situation?

Turnip is a Gherkin extension for RSpec.
Whatever the web application (ASP.NET, Django, and other..) is, Turnip run on RSpec.

Please try to consider used together with Capybara

---

Whatever the situation is, Turnip's concept is to solve the following Cucumber problems:

  1. Having a separate test framework is annoying
  2. Mapping steps to regexps is hard
  3. Cucumber has a huge, messy codebase
  4. Steps are always global

See: http://www.elabs.se/blog/30-solving-cucumber-s-problems

If you feel the same problem, Turnip is a very useful gem.
After that, please feel try to use !!



2015年7月7日火曜日 12時21分17秒 UTC+9 Sharon Snyder:
回复全部
回复作者
转发
0 个新帖子