spec/rack/musicindex_spec.rb in rack-musicindex-0.1.1 vs spec/rack/musicindex_spec.rb in rack-musicindex-0.2.0
- old
+ new
@@ -35,13 +35,13 @@
channel.xpath('title')[0].content.should eql('/foo')
channel.xpath('description')[0].content.should eql('Generated by Rack::MusicIndex')
items.size.should eql(1)
item.xpath('title')[0].content.should eql('bar')
- item.xpath('link')[0].content.should eql('http://example.org/foo/test.mp3')
- item.xpath('guid')[0].content.should eql('http://example.org/foo/test.mp3')
- item.xpath('enclosure')[0]['url'].should eql('http://example.org/foo/test.mp3')
+ item.xpath('link')[0].content.should eql('http://example.org/foo/test%20foo.mp3')
+ item.xpath('guid')[0].content.should eql('http://example.org/foo/test%20foo.mp3')
+ item.xpath('enclosure')[0]['url'].should eql('http://example.org/foo/test%20foo.mp3')
item.xpath('author')[0].content.should eql('foo')
item.xpath('itunes:author')[0].content.should eql('foo')
end
it 'should reflect file changes without restart' do
@@ -66,12 +66,12 @@
xml = Nokogiri::XML(last_response.body)
xml.xpath('//item').size.should eql(1)
end
it 'should return mp3' do
- get '/foo/test.mp3'
+ get '/foo/test%20foo.mp3'
last_response.should be_ok
last_response['Content-Type'].should eql('audio/mpeg')
- last_response.body.should eql(open(fixture('/foo/test.mp3'), 'rb').read)
+ last_response.body.should eql(open(fixture('/foo/test foo.mp3'), 'rb').read)
end
end