Cucumber testing with FbGraph

13 views
Skip to first unread message

lwv...@gmail.com

unread,
Apr 18, 2014, 1:20:10 PM4/18/14
to fb_g...@googlegroups.com
I've gotten FbGraph signning in correctly but under cucumber tests when i try to follow my "Sign in" link to new_facebook_path i get the error "uninitialized constant OauthController (ActionController::RoutingError)"

I've set it up in the same way as fb_graph_sample and i've gotten the following rspec tests working just fine.

describe FacebooksController do
  describe '.new' do
    it 'should setup all supported attributes' do
      attributes = {
        :id => '12345',
        :name => "Luke Woodruff",
        :friends => "friend1, someOtherPerson"
      }
      user = FbGraph::User.new(attributes.delete(:id),attributes)
      user.name.should == "Luke Woodruff"
    end
  end
  
  describe '.friends' do 
    it 'should return a users friends' do
      mock_graph :get, 'me/friends', 'users/friends/me_private', :access_token => 'access_token' do
        users = FbGraph::User.new('me', :access_token => 'access_token').friends
        users.each do |user|
          user.should be_instance_of(FbGraph::User)
        end
      end
    end
  end
end

nov matake

unread,
Apr 19, 2014, 12:20:21 AM4/19/14
to fb_g...@googlegroups.com
How it relates to fb_graph gem?

2014/04/19 2:20、lwv...@gmail.com のメール:

--
You received this message because you are subscribed to the Google Groups "FbGraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fb_graph+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages