From: Ben Beltran Date: Sun, 7 Oct 2012 23:54:09 +0000 (-0500) Subject: Add some stuff to the SourceManagerSpec X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/commitdiff_plain/4c4cd954eea5f2d00e32be1b91790b5cf5551551?ds=inline;hp=--cc Add some stuff to the SourceManagerSpec --- 4c4cd954eea5f2d00e32be1b91790b5cf5551551 diff --git a/spec/lib/lyricli/source_manager_spec.rb b/spec/lib/lyricli/source_manager_spec.rb index e69de29..8f999a7 100644 --- a/spec/lib/lyricli/source_manager_spec.rb +++ b/spec/lib/lyricli/source_manager_spec.rb @@ -0,0 +1,25 @@ +require "rspec" +require "lyricli" + +describe Lyricli::SourceManager do + before :each do + # Stub the configuration + @example_configuration = {"enabled_sources" => "test_class"} + Configuration.stub(:'[]').and_return(@example_configuration) + Configuration.stub(:delete) + + # Stub the test class. + module Lyricli + module Sources + module TestClass + end + end + end + + @example_artist = {:artist => "The Shins", :song => "Know Your Onion"} + + Lyricli::Sources::TestClass.stub(:enable) + Lyricli::Sources::TestClass.stub(:reset) + Lyricli::Sources::TestClass.stub(:current_track).and_return(@example_artist) + end +end