Skip to content
Browse files

Initial commit

  • Loading branch information...
0 parents commit 3ed0afb8d015d9877f9bd77de25e51b2c345c7c5 @sam-wan sam-wan committed Apr 16, 2008
Showing with 32 additions and 0 deletions.
  1. +9 −0 Rakefile
  2. +12 −0 lib/itunes_link_maker.rb
  3. +11 −0 spec/itunes_link_maker_spec.rb
9 Rakefile
@@ -0,0 +1,9 @@
+require 'rake'
+require 'spec/rake/spectask'
+
+task :default => [:spec]
+
+desc "Run all examples"
+Spec::Rake::SpecTask.new('spec') do |t|
+ t.spec_files = FileList['spec/*.rb']
+end
12 lib/itunes_link_maker.rb
@@ -0,0 +1,12 @@
+class ItunesLinkMaker
+ MEDIA = [ 'all', 'music', 'movie', 'shortFilm', 'tvShow',
+ 'musicVideo', 'audiobook', 'podcast', 'iTunesU' ]
+
+ COUNTRIES = [ 'AU', 'AT', 'BE', 'CA', 'DK', 'FI', 'FR', 'DE',
+ 'GR', 'IE', 'IT', 'JP', 'LU', 'NL', 'NZ', 'NO',
+ 'PT', 'ES', 'SE', 'CH', 'GB', 'US' ]
+
+ def self.create(query, media='music', country='US')
+ []
+ end
+end
11 spec/itunes_link_maker_spec.rb
@@ -0,0 +1,11 @@
+require File.dirname(__FILE__) + '/../lib/itunes_link_maker.rb'
+
+describe ItunesLinkMaker do
+ it "should be searchable given a query" do
+ ItunesLinkMaker.create('search query')
+ end
+
+ it "should return an array of results" do
+ ItunesLinkMaker.create('search query').should be_an_instance_of(Array)
+ end
+end

0 comments on commit 3ed0afb

Please sign in to comment.
Something went wrong with that request. Please try again.