3

I am using the Rhomobile framework to develop an application that is supposed to run on different mobile phones. The tutorial mentions how to write tests for the example model: Person. In fact, the framework provides a command-line tool rhogen spec to generate the dummy tests for the models. How would I go about writing tests for the controller class: PersonController? I was thinking of something similar to how one would do it in Rails, but rspec is unknown to me, and the methods post and redirect_to doesn't seem to work.

Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
wcmatthysen
  • 445
  • 4
  • 19

1 Answers1

0

In BDD when you want to specify the behavior of the application (this is what controllers are responsible for) - you would normally aproach that with a StoryBDD framework - use for example Cucumber . Rspec is SpecBDD and regards a different level of abstraction - it is for specifying how classess communicate with each other and what they do.

You can find many tutorials on Cucumber's github page. This one could be helpful

karolsojko
  • 711
  • 1
  • 8
  • 27