# @title Ruby AMQP gem: Running tests

h1. Running amqp gem test suite

h2. This Documentation Has Moved to rubyamqp.info

amqp gem documentation guides are now hosted on "rubyamqp.info":http://rubyamqp.info.


h2. 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 <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a> (including images & stylesheets). The source is available "on Github":https://github.com/ruby-amqp/amqp/tree/master/docs.


h2. Covered versions

Not applicable.




h2. Canonical repository

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



h2. Initial setup

amqp gem currently uses recent releases of RabbitMQ for automated tests. Broker installation is described in the {file:docs/GettingStarted.textile Getting started} guide
and on "rabbitmq.com":http://www.rabbitmq.com/install.html. Once the broker is running, the only other step is to run

<pre><code>
./bin/set_test_suite_realms_up.sh
</code></pre>

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.



h2. Dependencies

Dependencies are managed by Bundler. So begin with

<pre><code>
gem install bundler
</code></pre>

and then, from the root of the repository run

<pre><code>
bundle install
</code></pre>

and you are good to go.




h2. Running spec examples

During development, it is sufficient to just use

<pre><code>
bundle exec rspec -c ./spec
</code></pre>

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




h2. Continuous integration

CI happens in two steps:

 * Clean up *.rbc files produced by "Rubinius":http://rubini.us.
 * Run the whole test suite

For that, we use Rake:

<pre><code>
rake spec:ci
</code></pre>

Thanks to the excellent "Travis CI":http://travis-ci.org project, we run test suites across multiple Ruby implementations/versions and 2 EventMachine versions.


h2. Authors

This guide was written by "Michael Klishin":http://twitter.com/michaelklishin and edited by "Chris Duncan":https://twitter.com/celldee.



h2. Tell us what you think!

Please take a moment and tell us what you think about this guide "on Twitter":http://twitter.com/rubyamqp or "Ruby AMQP mailing list":http://groups.google.com/group/ruby-amqp:
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":mailto:michael@novemberain.com?subject=amqp%20gem%20documentation



<div id="disqus_thread"></div>
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = 'rubyamqpdocs'; // required: replace example with your forum shortname

    var disqus_developer = 0; // set to 1 on local machine for testing comments
    var disqus_identifier = 'amqp_running_tests_textile';
    var disqus_url = 'http://rdoc.info/github/ruby-amqp/amqp/master/file/docs/RunningTests.textile';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
