graphiti_spec_helpers 1.0.alpha.6 → 1.0.alpha.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58d3bbaa26d0375d6ec60f9ed1e2458e31555c25
4
- data.tar.gz: f022739fc29fba5fc2321db89fab12027daf5e63
3
+ metadata.gz: 1f7176abf26909175332508362b71101218ac907
4
+ data.tar.gz: e04f16807e2d6ba7fabb16410a788e410d99f127
5
5
  SHA512:
6
- metadata.gz: d0266eccaf9537e11e2b2572699339b962db97c8dae4dc63586e70628c15cdc66754c3ef2a5f9008fc1214a8362a5bd0bd5f0e41f6b50d418b8f17a376854a64
7
- data.tar.gz: 83f8c75c84f6954858cd955ee96540c9b74c6d67432a2e9732e727d537876a8cec8e75fff928c7242a2d4e71452ee7f3c45e38104a686630308520c210172655
6
+ metadata.gz: '0619e1b271c49321a0c30846ae803ae58d672df9445caa12ab4d8866f541fa18725df104ed945ee0dd70a32780e42369afaac10f607c14cef0f152a411c23279'
7
+ data.tar.gz: cff14d3e9e23f8f281a727b8f88126776c2706e75a24c32a5d1949fa19cb028a1f2b4e06b1bc9029d3255d6297ba96a6c677f4fcffe9b0d9e65a7b7d61778091
@@ -60,7 +60,7 @@ module GraphitiSpecHelpers
60
60
  end
61
61
 
62
62
  def method_missing(id, *args, &blk)
63
- if error = @errors.find { |e| e.attribute == id }
63
+ if error = @errors.find { |e| e.attribute.to_sym == id }
64
64
  return error
65
65
  else
66
66
  super
@@ -4,6 +4,16 @@ require 'graphiti_spec_helpers'
4
4
  let(:resource) { described_class }
5
5
  let(:params) { {} }
6
6
 
7
+ around do |e|
8
+ begin
9
+ original = Graphiti::Resource.validate_endpoints
10
+ Graphiti::Resource.validate_endpoints = false
11
+ e.run
12
+ ensure
13
+ Graphiti::Resource.validate_endpoints = original
14
+ end
15
+ end
16
+
7
17
  # If you need to set context:
8
18
  #
9
19
  # Graphiti.with_context my_context, {} do
@@ -17,8 +27,9 @@ require 'graphiti_spec_helpers'
17
27
 
18
28
  def proxy
19
29
  @proxy ||= begin
20
- ctx = ::GraphitiSpecHelpers::TestRunner.new(resource, params)
21
- defined?(base_scope) ? ctx.proxy(base_scope) : ctx.proxy
30
+ args = [params]
31
+ args << base_scope if defined?(base_scope)
32
+ resource.all(*args)
22
33
  end
23
34
  end
24
35
 
@@ -1,3 +1,3 @@
1
1
  module GraphitiSpecHelpers
2
- VERSION = "1.0.alpha.6"
2
+ VERSION = "1.0.alpha.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti_spec_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.alpha.6
4
+ version: 1.0.alpha.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-21 00:00:00.000000000 Z
11
+ date: 2018-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphiti