Sha256: 33fc951c81281dda63d64591cb37eaa8be07a1257349c42261b5503ccd6bbc98
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'json' require 'hashie' require 'google_contacts_api' puts "Testing version #{GoogleContactsApi::VERSION}" # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. # Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| config.mock_framework = :rspec end def contact_set_json f = File.open("#{File.dirname(__FILE__)}/contact_set.json") json = f.read f.close json end def group_set_json f = File.open("#{File.dirname(__FILE__)}/group_set.json") json = f.read f.close json end def contact_json_hash Hashie::Mash.new(JSON.parse(contact_set_json)).feed.entry.first end def contact_no_emails_json_hash Hashie::Mash.new(JSON.parse(contact_set_json)).feed.entry[1] end def contact_no_primary_email_json_hash Hashie::Mash.new(JSON.parse(contact_set_json)).feed.entry[2] end def group_json_hash Hashie::Mash.new(JSON.parse(group_set_json)).feed.entry.first end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
google_contacts_api-0.2.6 | spec/spec_helper.rb |
google_contacts_api-0.2.5 | spec/spec_helper.rb |