Sha256: acf14747e2534d5687f26894bda93132fc874ed68e5e1a58148a47cd2668798a

Contents?: true

Size: 943 Bytes

Versions: 20

Compression:

Stored size: 943 Bytes

Contents

require 'spec_helper'
require 'contacts/windows_live'

describe Contacts::WindowsLive do

  before(:each) do
    @path = Dir.getwd + '/spec/feeds/'
    @wl = Contacts::WindowsLive.new(@path + 'contacts.yml')
  end
  
  it 'parse the XML contacts document' do
    contacts = Contacts::WindowsLive.parse_xml(contacts_xml)
    
    contacts[0].name.should be_nil
    contacts[0].email.should == 'froz@gmail.com'
    contacts[1].name.should == 'Rafael Timbo'
    contacts[1].email.should == 'timbo@hotmail.com'
    contacts[2].name.should be_nil
    contacts[2].email.should == 'betinho@hotmail.com'

  end

  it 'should can be initialized by a YAML file' do
    wll = @wl.instance_variable_get('@wll')

    wll.appid.should == 'your_app_id'
    wll.securityalgorithm.should == 'wsignin1.0'
    wll.returnurl.should == 'http://yourserver.com/your_return_url'
  end

  def contacts_xml
    File.open(@path + 'wl_contacts.xml', 'r+').read
  end
end

Version data entries

20 entries across 20 versions & 5 rubygems

Version Path
aeden-contacts-0.2.15 spec/windows_live/windows_live_spec.rb
keavy-contacts-0.2.8 spec/windows_live/windows_live_spec.rb
keavy-contacts-0.2.9 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.13 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.14 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.15 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.16 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.17 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.18 spec/windows_live/windows_live_spec.rb
rakutenusa-contacts-0.2.19 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.8 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.7 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.6 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.5 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.4 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.3 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.2 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0.1 spec/windows_live/windows_live_spec.rb
lperichon-contacts-1.0 spec/windows_live/windows_live_spec.rb
sundawg_contacts-0.0.1 spec/windows_live/windows_live_spec.rb