]> git.r.bdr.sh - rbdr/lyricli.rb/commitdiff
Add some stuff to the SourceManagerSpec
authorBen Beltran <redacted>
Sun, 7 Oct 2012 23:54:09 +0000 (18:54 -0500)
committerBen Beltran <redacted>
Sun, 7 Oct 2012 23:54:09 +0000 (18:54 -0500)
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