Clean up group_context.rb

This commit is contained in:
Shuhei Kitagawa 2018-04-11 08:59:58 +09:00 committed by Shishir Kakaraddi
parent 0008c5a165
commit af0aed4414

View File

@ -26,21 +26,7 @@ RSpec.shared_context 'group class' do
end
end
# Namespaced PersonSerializer
before(:context) do
# namespaced model stub
module AppName
module V1
class PersonSerializer
include FastJsonapi::ObjectSerializer
# to test if compute_serializer_name works
end
end
end
end
# Movie and Actor struct
# Person and Group struct
before(:context) do
PersonStruct = Struct.new(
:id, :first_name, :last_name
@ -57,7 +43,6 @@ RSpec.shared_context 'group class' do
PersonSerializer
Group
GroupSerializer
AppName::V1::PersonSerializer
PersonStruct
GroupStruct
]
@ -66,25 +51,6 @@ RSpec.shared_context 'group class' do
end
end
let(:group_struct) do
group = GroupStruct.new
group[:id] = 1
group[:name] = 'Group 1'
group[:groupees] = []
person = PersonStruct.new
person[:id] = 1
person[:last_name] = "Last Name 1"
person[:first_name] = "First Name 1"
child_group = GroupStruct.new
child_group[:id] = 2
child_group[:name] = 'Group 2'
group.groupees = [person, child_group]
group
end
let(:group) do
group = Group.new
group.id = 1