Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass auth options inline for test

  • Loading branch information...
commit 56cd9ba272c9c8c32a8b34c542eba46150b0a8da 1 parent 6524dd7
@pengwynn authored
Showing with 7 additions and 12 deletions.
  1. +7 −12 spec/rdio_spec.rb
View
19 spec/rdio_spec.rb
@@ -117,24 +117,19 @@
Rdio.run %w(q)
end
context "when authenticated" do
- before do
- config = {
- :consumer_key => 'fup94efx5qgb2uunev7dsdyt',
- :consumer_secret => 'YdvEwYJsUj5w',
- :access_key => 'fczfuy25vf83bzz35hw6p5pc8ft5ur6wsb8u5dcqa5zwbzbwrvfzbudpnwx2b3nz',
- :access_secret => 'exyNUP88Ur'
- }
- File.open(File.join(ENV['HOME'], '.rdio'), 'w') do |out|
- YAML.dump(config, out)
- end
- end
it "snags the currently playing track to your collection" do
Rdio.stub(:current_track_key).and_return('t12345')
Api.any_instance.should_receive(:call).
with('addToCollection', {:keys => 't12345'})
- Rdio.run ['snag']
+ Rdio.run [
+ '--consumer_key=fup94efx5qgb2uunev7dsdyt',
+ '--consumer_secret=YdvEwYJsUj5w',
+ '--access_token=fczfuy25vf83bzz35hw6p5pc8ft5ur6wsb8u5dcqa5zwbzbwrvfzbudpnwx2b3nz',
+ '--access_secret=exyNUP88Ur',
+ 'snag'
+ ]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.