O'Reilly logo

Rhomobile Beginner's Guide by Abhishek Nalwaya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action Getting ready for testing the Rhodes application

Now, we will configure mspec to write a unit test for our Rhodes application. We have to generate a few files using the rhogen generator.

Run the following command in your application directory:

$ rhogen spec

We can see the following files being created using the rhogen command:

Generating with spec generator:
[ADDED] app/SpecRunner
[ADDED] app/spec
[ADDED] app/mspec.rb
[ADDED] app/spec_runner.rb

It has created a folder SpecRunner, which contains a controller and an index file. These files will help us to run and check the test result from the simulator.

It also creates the mspec test files mspec.rb and spec_runner.rb, which will help to run the unit test.

To use these Ruby extensions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required