Sha256: 053753d51962971ec570583b478bede07d887ea1df01e773a1427d1fd79c5a59
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
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].firstname.should == "Rafael" contacts[1].lastname.should == "Timbo" 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aeden-contacts-0.2.16 | spec/windows_live/windows_live_spec.rb |
aeden-contacts-0.2.18 | spec/windows_live/windows_live_spec.rb |
aeden-contacts-0.2.19 | spec/windows_live/windows_live_spec.rb |