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

28 views
Skip to first unread message

Sharon Snyder

unread,
Jul 6, 2015, 11:21:17 PM7/6/15
to 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

unread,
Jul 8, 2015, 8:45:56 AM7/8/15
to 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:
Reply all
Reply to author
Forward
0 new messages