spec/stratify-itunes/integration_spec.rb in stratify-itunes-0.1.3.1 vs spec/stratify-itunes/integration_spec.rb in stratify-itunes-0.1.4
- old
+ new
@@ -4,15 +4,15 @@
before do
itunes_library_path = File.expand_path('../../fixtures/iTunes Music Library.xml', __FILE__)
collector = Stratify::ITunes::Collector.create!(:library_path => itunes_library_path)
collector.run
end
-
+
it "collects and stores recently-played music from iTunes" do
Stratify::ITunes::Activity.where(
:persistent_id => "83B3927542025FDC",
- :name => "Smells Like Teen Spirit",
+ :name => "Smells Like Teen Spirit",
:album => "Nevermind",
:artist => "Nirvana",
:composer => "Kurt Cobain, David Grohl, Chris Novoselic",
:genre => "Rock",
:track_number => 1,
@@ -22,11 +22,11 @@
end
it "collects and stores recently-played podcasts from iTunes" do
Stratify::ITunes::Activity.where(
:persistent_id => "90228FA50E9DF82D",
- :name => "Tech News Today 186: Who Are Yooodle?",
+ :name => "Tech News Today 186: Who Are Yooodle?",
:album => "Tech News Today",
:artist => "Tom Merritt, Becky Worley, Sarah Lane and Jason Howell",
:genre => "Podcast",
:track_number => 186,
:year => 2011,
@@ -36,11 +36,11 @@
end
it "collects and stores recently-played TV shows from iTunes" do
Stratify::ITunes::Activity.where(
:persistent_id => "401802E7B506C475",
- :name => "A No-Rough-Stuff Type Deal",
+ :name => "A No-Rough-Stuff Type Deal",
:album => "Breaking Bad, Season 1",
:artist => "Breaking Bad",
:genre => "Drama",
:season_number => 1,
:episode_number => 7,
@@ -51,27 +51,27 @@
end
it "collects and stores recently-played movies from iTunes" do
Stratify::ITunes::Activity.where(
:persistent_id => "3B7824E068FB05A6",
- :name => "V for Vendetta",
+ :name => "V for Vendetta",
:genre => "Action & Adventure",
:movie => true,
:created_at => Time.parse("2011-02-27T23:24:35Z")
).should exist
end
it "collects and stores recently-played audiobooks from iTunes" do
Stratify::ITunes::Activity.where(
:persistent_id => "DB6F370B2A647633",
- :name => "Born Standing Up: A Comic's Life (Unabridged)",
+ :name => "Born Standing Up: A Comic's Life (Unabridged)",
:artist => "Steve Martin",
:genre => "Biography & Memoir",
:created_at => Time.parse("2011-02-27T21:52:43Z")
).should exist
end
-
+
it "does not collect unplayed items from iTunes" do
Stratify::ITunes::Activity.where(:persistent_id => "8780A3C7A0117B2B").should_not exist
end
end
@@ -80,10 +80,10 @@
it "works over HTTP" do
itunes_library_path = "http://dl.dropbox.com/u/1234567/iTunes%20Music%20Library.xml"
collector = Stratify::ITunes::Collector.create!(:library_path => itunes_library_path)
collector.run
-
+
Stratify::ITunes::Activity.where(:persistent_id => "83B3927542025FDC").should exist
end
end