webmock-resources 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,12 @@ module WebMock::Resources
14
14
  schema[:object] ? schema[:object].new(resource) : resource
15
15
  end
16
16
 
17
+ def self.create_many resource_name, amount, attributes = {}
18
+ amount.times.map do
19
+ create resource_name, attributes
20
+ end
21
+ end
22
+
17
23
  def self.stub_resource resource_name, resource
18
24
  url = "webmock/api/#{resource_name}/#{resource[:id]}"
19
25
  stub_request(:get, url).to_return body: JSON.dump(resource), status: 200, headers: headers
@@ -1,5 +1,5 @@
1
1
  module WebMock
2
2
  module Resources
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: