test/mockspotify_spec.rb in mockspotify-0.1.3 vs test/mockspotify_spec.rb in mockspotify-0.1.4
- old
+ new
@@ -1,5 +1,6 @@
+require 'rubygems' unless defined?(Gem)
require 'mockspotify'
require 'minitest/autorun'
describe Spotify::Mock do
it "should define VERSION" do
@@ -10,10 +11,10 @@
Spotify::Mock.path.must_be_kind_of String
Spotify::Mock.path.must_match /libmockspotify\.(so|bundle)/
end
it "should have injected itself into Spotify's ancestor chain" do
- Spotify.singleton_class.ancestors.take(2).must_equal [Spotify::Mock, FFI::Library]
+ (class << Spotify; self; end).ancestors.take(2).must_equal [Spotify::Mock, FFI::Library]
end
describe ".mock_artist" do
before do
@artist = Spotify.mock_artist "Bonkers", true