Skip to content

Commit 6f032d7

Browse files
committed
Fix whitespace
1 parent 2522cd8 commit 6f032d7

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

spec/graphql/introspection/type_by_name_field_spec.rb

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,37 @@
22
require "spec_helper"
33

44
describe GraphQL::Introspection::TypeByNameField do
5-
describe "after instrumentation" do
6-
# Just make sure it returns a new object, not the original field
7-
class DupInstrumenter
8-
def self.instrument(t, f)
9-
f.redefine {
10-
resolve ->(o, a, c) { :no_op }
11-
}
12-
end
5+
describe "after instrumentation" do
6+
# Just make sure it returns a new object, not the original field
7+
class DupInstrumenter
8+
def self.instrument(t, f)
9+
f.redefine {
10+
resolve ->(o, a, c) { :no_op }
11+
}
1312
end
13+
end
1414

15-
class ArgAnalyzer
16-
def call(_, _, node)
17-
if node.ast_node.is_a?(GraphQL::Language::Nodes::Field)
18-
node.arguments
19-
end
15+
class ArgAnalyzer
16+
def call(_, _, node)
17+
if node.ast_node.is_a?(GraphQL::Language::Nodes::Field)
18+
node.arguments
2019
end
2120
end
21+
end
2222

23-
let(:instrumented_schema) {
24-
# This was probably assigned earlier in the test suite, but to simulate an application, clear it.
25-
GraphQL::Introspection::TypeByNameField.arguments_class = nil
23+
let(:instrumented_schema) {
24+
# This was probably assigned earlier in the test suite, but to simulate an application, clear it.
25+
GraphQL::Introspection::TypeByNameField.arguments_class = nil
2626

27-
Dummy::Schema.redefine {
28-
instrument(:field, DupInstrumenter)
29-
query_analyzer(ArgAnalyzer.new)
30-
}
27+
Dummy::Schema.redefine {
28+
instrument(:field, DupInstrumenter)
29+
query_analyzer(ArgAnalyzer.new)
3130
}
31+
}
3232

33-
it "still works with __type" do
34-
res = instrumented_schema.execute("{ __type(name: \"X\") { name } }")
35-
assert_equal({"data"=>{"__type"=>nil}}, res)
36-
end
33+
it "still works with __type" do
34+
res = instrumented_schema.execute("{ __type(name: \"X\") { name } }")
35+
assert_equal({"data"=>{"__type"=>nil}}, res)
3736
end
38-
37+
end
3938
end

0 commit comments

Comments
 (0)