spec/generators/graphql/install_generator_spec.rb in graphql-1.7.4 vs spec/generators/graphql/install_generator_spec.rb in graphql-1.7.5
- old
+ new
@@ -62,9 +62,16 @@
assert_file "app/graphql/types/query_type.rb", expected_query_type
assert_file "app/controllers/graphql_controller.rb", EXPECTED_GRAPHQLS_CONTROLLER
end
+ test "it allows for a user-specified install directory" do
+ run_generator(["--directory", "app/mydirectory"])
+
+ assert_file "app/mydirectory/types/.keep"
+ assert_file "app/mydirectory/mutations/.keep"
+ end
+
test "it generates graphql-batch and relay boilerplate" do
run_generator(["--batch", "--relay"])
assert_file "app/graphql/loaders/.keep"
assert_file "Gemfile" do |contents|
assert_match %r{gem ('|")graphql-batch('|")}, contents