]> git.r.bdr.sh - rbdr/lyricli.rb/blobdiff - spec/lib/lyricli/source_manager_spec.rb
Adds -t / --title option to show header
[rbdr/lyricli.rb] / spec / lib / lyricli / source_manager_spec.rb
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8f999a7bb26787d683d20ad559efbea24a119bbf 100644 (file)
@@ -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