spec/BtSync/bt_sync_spec.rb in BtSync-0.6.1 vs spec/BtSync/bt_sync_spec.rb in BtSync-0.6.2
- old
+ new
@@ -126,20 +126,27 @@
folder = folders.last
folder.name.should be == '/home/vagrant'
end
end
it 'can check speeds' do
- VCR.use_cassette('check speeds') do
- @bt.up.should be == {speed: 0.0, metric: 'kB/s'}
+ VCR.use_cassette('check speeds', allow_playback_repeats: true) do
+ @bt.speed('up').should be == {speed: 0.0, metric: 'kB/s'}
end
- VCR.use_cassette('check speeds') do
- @bt.down.should be == {speed: 0.0, metric: 'kB/s'}
+ VCR.use_cassette('check speeds', allow_playback_repeats: true) do
+ @bt.speed('down').should be == {speed: 0.0, metric: 'kB/s'}
end
+ VCR.use_cassette('check speeds', allow_playback_repeats: true) do
+ @bt.get_speed.should be == {up: {speed: 0.0, metric: 'kB/s'}, down: {speed: 0.0, metric: 'kB/s'}}
+ end
end
it 'can check for new versions' do
VCR.use_cassette('check for new version') do
res = @bt.check_new_version
res["url"].should be == ""
res["version"].should be == 0
end
+ end
+ it 'can symbolize a hash -_-' do
+ @bt.send('symbolize', {'test' => 'value'}).should be == {test: 'value'}
+ @bt.send('symbolize', {test: 'value'}).should be == {test: 'value'}
end
end
\ No newline at end of file