putpat / rockstar

Rockstar is a wrapper for the audioscrobbler v2.0 (last.fm) web services. This gem includes scrobbling with the new api.
MIT License
82 stars 29 forks source link

Failures on master #8

Closed zapnap closed 13 years ago

zapnap commented 13 years ago

Just wanted to get a quick sanity check here... I'm seeing 3 failures on the master branch at the moment:

1) Error: test_can_scrobble_tracks(TestTrack): ArgumentError: wrong number of arguments (5 for 0) ./test/unit/test_track.rb:49:in initialize' ./test/unit/test_track.rb:49:innew' ./test/unit/test_track.rb:49:in `test_can_scrobble_tracks'

2) Error: test_can_send_current_playing_track(TestTrack): ArgumentError: wrong number of arguments (5 for 0) ./test/unit/test_track.rb:57:in initialize' ./test/unit/test_track.rb:57:innew' ./test/unit/test_track.rb:57:in `test_can_send_current_playing_track'

3) Failure: test_should_get_recommendated_events(TestUser) [./test/unit/test_user.rb:267]: 814 expected but was 827.

Expected?

bitboxer commented 13 years ago

Thats strange. I have this:

104 tests, 325 assertions, 0 failures, 0 errors, 0 skips

zapnap commented 13 years ago

Environment difference? Using Ruby 1.9.2 here.

bitboxer commented 13 years ago

Me too. Ruby 1.9.2 on Mac Os. Starting tests with rake test. Nothing unusual here.

It looks like your Time class is different from the one in the ruby core?

This is the documentation for that class:

http://railsapi.com/doc/ruby-v1.9.2/classes/Time.html#M001293

zapnap commented 13 years ago

Sorry, my bad. Was actually using 1.8.7 when running that test (rvmrc was wrong in the parent directory). When running under 1.9.2, I have only one error. Looks like I'm missing a test fixture:

fixtures/xml/track/scrobble_artist[0]_Carrie_Underwood_sk_tag_timestamp[0]_1286719800_track[0]_Before_He_Cheats.xml

A fixture exists with a similar name but a different timestamp, which would seem to indicate that it's a timezone offset / localization issue.

zapnap commented 13 years ago

Sending you a pull request with the fix :)

bitboxer commented 13 years ago

Hm...that should not happen. If you have a timestamp issue, there should be some more tests that failed...could you investigate a little more into this? Thanks.

zapnap commented 13 years ago

Try setting your clock to a different timezone and run the tests?

zapnap commented 13 years ago

(the issue is presumably that the timezone is encoded in the filename, with no regard for the source timezone recorded there in this case)

bitboxer commented 13 years ago

sorry,. your message and mine overlapped. I have now seen your pull request and am merging it now.

bitboxer commented 13 years ago

Will close this ticket now