require 'spec_helper' describe 'Fetcher::Microdata::PersonUser::Facebook::Coercer' do context 'the Coercer receives a valid person user' do before do @user_ex = JSON.parse File.read "spec/user.json" @person_user = ::Fetcher::Microdata::PersonUser::Facebook::Coercer.call @user_ex end it "should initialize the :name with 'name'" do @person_user[:name].should == @user_ex["name"] end it "should initialize the :id with 'id'" do @person_user[:id].should == @user_ex["id"] end it "should initialize the :nameadditionalType with 'nameadditionalType'" do @person_user[:nameadditionalType].should == @user_ex["additionalType"] end it "should initialize the :_type with '_type'" do @person_user[:_type].should == @user_ex["_type"] end end end