From 0c607111dee5814be23b9501361b9fa9f95823a6 Mon Sep 17 00:00:00 2001 From: nov Date: Mon, 5 May 2014 23:36:40 +0900 Subject: [PATCH] basic node spec --- spec/fb_graph2/node_spec.rb | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/spec/fb_graph2/node_spec.rb b/spec/fb_graph2/node_spec.rb index 596b7b6..722c240 100644 --- a/spec/fb_graph2/node_spec.rb +++ b/spec/fb_graph2/node_spec.rb @@ -1,5 +1,29 @@ require 'spec_helper' describe FbGraph2::Node do - it :TODO + let(:klass) { FbGraph2::Node } + let(:instance) { klass.new 'identifier' } + + context 'class' do + subject { klass } + it { should_not respond_to :register_attributes } + it { should_not respond_to :registered_attributes } + it { should_not respond_to :registered_attributes= } + end + + context 'instance' do + subject { instance } + it { should_not respond_to :assign } + + describe '#initialize' do + its(:id) { should == 'identifier' } + its(:access_token) { should be_nil } + its(:raw_attributes) { should be_nil } + end + + describe '#authenticate' do + before { instance.authenticate 'access_token' } + its(:access_token) { should == 'access_token' } + end + end end \ No newline at end of file