spec/facemock/fb_graph/application_spec.rb in facemock-0.0.7 vs spec/facemock/fb_graph/application_spec.rb in facemock-0.0.8
- old
+ new
@@ -14,11 +14,11 @@
@database = Facemock::Database.new
end
after { @database.drop }
describe '#new' do
- before { @default_record_size = Facemock::Database::Application.all.size }
+ before { @default_record_size = Facemock::Application.all.size }
context 'without argument' do
subject { lambda { Facemock::FbGraph::Application.new } }
it { is_expected.to raise_error ArgumentError }
end
@@ -27,11 +27,11 @@
shared_context 'new is success and record creates', assert: :attributes_and_created_record do
it 'should set only identifier specified value by argument and record create' do
expect(@app.identifier).to eq @id
expect(@app.secret).to be_nil
expect(@app.access_token).to be_nil
- expect(Facemock::Database::Application.all.size).to eq @default_record_size
+ expect(Facemock::Application.all.size).to eq @default_record_size
end
end
context 'when facebook app id is integer', assert: :attributes_and_created_record do
before do
@@ -55,11 +55,11 @@
it 'should set only identifier specified value by argument and record does not create' do
expect(@app.identifier).to eq @id
expect(@app.secret).to be_nil
expect(@app.access_token).to be_nil
- expect(Facemock::Database::Application.all.size).to eq @default_record_size
+ expect(Facemock::Application.all.size).to eq @default_record_size
end
end
context 'and all options' do
before do
@@ -69,10 +69,10 @@
it 'should set all attributes specified value by argument' do
expect(@app.identifier).to eq facebook_app_id
expect(@app.secret).to eq @options[:secret]
expect(@app.access_token).to eq @options[:access_token]
- expect(Facemock::Database::Application.all.size).to eq @default_record_size
+ expect(Facemock::Application.all.size).to eq @default_record_size
end
end
end
end