Sha256: 3e6c6b9ecfe1e8eceb85e0a908b741e0ed2d14102fad234f0396c5d6e2f19707
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
include ApiResource Mocks.define do endpoint("/test_resources/new") do get(HashDealer.roll(:new_test_object)) end endpoint("/test_resources") do post(HashDealer.roll(:test_resource).merge(:id => 1), :params => {:test_resource => HashDealer.roll(:test_resource).matcher}) post(HashDealer.roll(:test_resource).merge(:id => 1), :params => {:test_resource => HashDealer.roll(:test_resource_with_roles).matcher}) get((0..4).to_a.collect{HashDealer.roll(:test_resource)}) get((0..4).to_a.collect{HashDealer.roll(:test_resource)}, :params => {:active => true}) end endpoint("/test_resources/:id") do get(HashDealer.roll(:test_resource)) do |params| self.merge(params) end delete({}) put({}, :params => {:test_resource => HashDealer.roll(:test_resource).matcher}) end endpoint("/child_test_resources/new") do get({}) end endpoint("/child_test_resource2s/new") do get({}) end endpoint("/another_test_resources/new") do get({}) end endpoint("/test_classes/new") do get({}) end endpoint("/children/new") do get({}) end end
Version data entries
5 entries across 5 versions & 1 rubygems