Sha256: 234035160232feb6981edbc9868df4fd259470d938b6d707e55ff0b95bbd24c7

Contents?: true

Size: 682 Bytes

Versions: 34

Compression:

Stored size: 682 Bytes

Contents

require 'lastfm'

RSpec.configure do |config|
  def fixture(filename)
    File.dirname(__FILE__) + '/fixtures/' + filename
  end

  def make_response(xml_filename_or_string)
    if xml_filename_or_string !~ /</
      xml_filename_or_string = open(fixture(xml_filename_or_string + '.xml')).read
    end

    Lastfm::Response.new(xml_filename_or_string)
  end
  
  def init_lastfm
    @lastfm = Lastfm.new('xxx', 'yyy')
    @response_xml = <<XML
<?xml version="1.0" encoding="utf-8"?>
<lfm status="ok">
<foo>bar</foo></lfm>
XML
    ok_response_xml = <<XML
<?xml version="1.0" encoding="utf-8"?>
<lfm status="ok">
</lfm>
XML
    @ok_response = make_response(ok_response_xml)
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
lastfm-1.27.4 spec/spec_helper.rb
lastfm-1.27.3 spec/spec_helper.rb
lastfm-1.27.2 spec/spec_helper.rb
lastfm-1.27.1 spec/spec_helper.rb
lastfm-1.27.0 spec/spec_helper.rb
lastfm-1.26.0 spec/spec_helper.rb
lastfm-1.25.0 spec/spec_helper.rb
lastfm-1.24.0 spec/spec_helper.rb
lastfm-1.23.0 spec/spec_helper.rb
lastfm-1.22.0 spec/spec_helper.rb
lastfm-1.21.0 spec/spec_helper.rb
lastfm-1.20.1 spec/spec_helper.rb
lastfm-1.19.1 spec/spec_helper.rb
lastfm-1.19.0 spec/spec_helper.rb
lastfm-1.18.0 spec/spec_helper.rb
lastfm-1.17.0 spec/spec_helper.rb
lastfm-1.16.0 spec/spec_helper.rb
lastfm-1.15.1 spec/spec_helper.rb
lastfm-1.15.0 spec/spec_helper.rb
lastfm-1.14.1 spec/spec_helper.rb