-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Hallon comes bundled with tests to make sure nothing breaks between releases and that everything works as expected. Running the tests does however need an application key
and login credentials for Spotify. The reason for this is that Hallon tests live against Spotify (if you know a better way, please do tell).
The application key must be recovered from Spotify, and login credentials are the same username and password you use for Spotify. The tests must be aware of all three of these things. The most simple way is to download the binary distribution of your Spotify application key into spec/support/spotify_appkey.key
, and create the file spec/support/config.rb
with the following contents:
ENV['HALLON_USERNAME'] = 'spotify username'
ENV['HALLON_PASSWORD'] = 'spotify password'
ENV['HALLON_APPKEY'] = File.expand_path('../spotify_appkey.key', __FILE__)
module Hallon
APPKEY = IO.read ENV['HALLON_APPKEY']
end
Running the tests after that should be a simple rake spec
.
PS: Do note that you need libspotify installed; for help with that see the installation help page for libspotify-ruby.