0

I am new for cucumber. I want to create on sample application using cucumber. I am working on Windows 7 OS. Can any one guide me?

Thanks.

Anand Soni
  • 5,070
  • 11
  • 50
  • 101
  • I have recently learned that you can get much of the benefit of Cucumber/Capybara by writing plain ol' integration tests using Capybara. Cucumber adds too much extra cognitive and maintenance overhead for what it accomplishes, IMO. – Steve Jorgensen Mar 23 '11 at 07:50

3 Answers3

0

Here is the guide how to do it.

Sergey Kishenin
  • 5,099
  • 3
  • 30
  • 50
  • Thanks for your help. But can you suggest me any site which guides to build a simple rails application using cucumber in windows environment? – Anand Soni Mar 23 '11 at 06:25
  • Add cucumber-rails gem to your Gemfile and follow advices at https://github.com/aslakhellesoy/cucumber-rails – Sergey Kishenin Mar 23 '11 at 07:12
0

I think these are two separate problems:

  1. Building a Rails application on Windows

  2. Building a Rails application with Cucumber (using principles promoted by Cucumber like BDD, Specification by Example and an outside-in workflow)


Building a Rails application on Windows

There are a lot of tutorials, best starting point is probably: Getting Started with Rails on Rails Guides.
However the official advice there is using a virtual machine with Linux :-)

Here is a good thread with advice for running Rails under Windows.


Building a Rails application with Cucumber

An extraordinary example for this is the Book Rails 3 in Action by Manning.

This book really excels at showing how to create an application outside-in with Specification by Example using Cucumber.

In each chapter of the book a new feature is implemented. There are almost no screenshots explaining those features. Instead the authors are using Cucumber scenarios at the beginning of each chapter to exactly specify the desired new behavior that is the topic of given chapter. Then they are showing and explaining the necessary steps and the code that is needed to implement the functionality.

This is the best example I have found for using Cucumber with Rails so far. This is also a really great example how Specfication by Example can be used for building a shared understanding - since teaching is all about sharing understanding.
However the scenarios in the book are quite focusing of specifying behavior on the UI level ... which is not commonly agreed on being best practice. But for teaching Rails it is great.

Rails 3 in Action is still in the early access program. I don't know where the official sources are.
But when you search on GitHub you already find different implementations of the example application (Tiketee):

https://github.com/rubykr/ticketee
https://github.com/oMartell/ticketee-rails-3-in-action
https://github.com/rails3book/ticketee

Community
  • 1
  • 1
jbandi
  • 17,499
  • 9
  • 69
  • 81
0

I found an interesting webcast video that does just this.

The basic procedure is define a couple features in cucumber. (actually the gherkin language)

  1. Run cucumber

  2. Fix errors

Repeat the 2 steps until you have a working app.

It makes use of a few RoR gems like webrat and rspec.

http://railscasts.com/episodes/155-beginning-with-cucumber

Vicky T
  • 1,643
  • 4
  • 15
  • 12