Building Tests for New discourse_api Endpoints

Ah, right, so how about …

Examples

To try the examples in /examples you will need a Discourse instance up and running, installed either locally or in the cloud, then:

  1. Specify your environment by making a copy of config-example.yml to create a file called config.yml with your environment settings.
  2. In a given example file, comment out all but the examples you want to run.
  3. Edit the example file with any required parameters, e.g. a target username passed to the method.
  4. Running the file will then pull from your config.yml to run a given client method (e.g. client.badges) against your Discourse instance

Testing

To run the discourse_api tests in spec:

  1. Install bundler in the discourse_api directory, run gem install bundler
  2. Inside of your discourse_api directory, run: bundle exec rspec spec/