Sha256: cceb1c6c7b7a19fcb2d0e64ad74ced0fb3f7907e64482e17437d81af9dfd6bda
Contents?: true
Size: 615 Bytes
Versions: 3
Compression:
Stored size: 615 Bytes
Contents
RSpec.shared_context 'users and tasks' do include_context 'setup' let(:users_relation) do Class.new(ROM::HTTP::Relation) do schema(:users) do attribute :id, ROM::Types::Int end def by_id(id) with_params(id: id) end end end let(:tasks_relation) do Class.new(ROM::HTTP::Relation) do schema(:tasks) do attribute :id, ROM::Types::Int end def by_id(id) with_params(id: id) end end end before do configuration.register_relation(users_relation) configuration.register_relation(tasks_relation) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rom-http-0.7.0 | spec/shared/users_and_tasks.rb |
rom-http-0.6.0 | spec/shared/users_and_tasks.rb |
rom-http-0.6.0.rc1 | spec/shared/users_and_tasks.rb |