Running amqp gem test suite

This Documentation Has Moved to rubyamqp.info

amqp gem documentation guides are now hosted on rubyamqp.info.

About this guide

This guide is for people who want to contribute to amqp gem development. It has no relevant information for those who want to build applications using the library.

This work is licensed under a Creative Commons Attribution 3.0 Unported License (including images & stylesheets). The source is available on Github.

Covered versions

Not applicable.

Canonical repository

Since late 2010, the canonical amqp gem repository is at github.com/ruby-amqp/amqp and not tmm1/amqp.

Initial setup

amqp gem currently uses recent releases of RabbitMQ for automated tests. Broker installation is described in the Getting started guide and on rabbitmq.com. Once the broker is running, the only other step is to run


./bin/set_test_suite_realms_up.sh

that will set up vhosts and users we test authentication and authorization against. Please note that the script uses `rabbitmqctl` tool and in the server environment (for example, a virtual instance in the cloud) depending on your OS and/or distribution of choice, that tool may or may not be accessible to your OS user, so pay attention to that.

Dependencies

Dependencies are managed by Bundler. So begin with


gem install bundler

and then, from the root of the repository run


bundle install

and you are good to go.

Running spec examples

During development, it is sufficient to just use


bundle exec rspec -c ./spec

or replace ./spec with an individual file you want to run.

Continuous integration

CI happens in two steps:

For that, we use Rake:


rake spec:ci

Thanks to the excellent Travis CI project, we run test suites across multiple Ruby implementations/versions and 2 EventMachine versions.

Authors

This guide was written by Michael Klishin and edited by Chris Duncan.

Tell us what you think!

Please take a moment and tell us what you think about this guide on Twitter or Ruby AMQP mailing list: what was unclear? what wasn’t covered? maybe you don’t like guide style or grammar and spelling are incorrect? Readers feedback is key to making documentation better.

If mailing list communication is not an option for you for some reason, you can contact guides author directly