test/lib/generators/jsonapi/resource_generator_test.rb in jsonapi-resources-0.5.7 vs test/lib/generators/jsonapi/resource_generator_test.rb in jsonapi-resources-0.5.8

- old
+ new

@@ -15,9 +15,14 @@ test "resource is created" do run_generator ["post"] assert_file 'app/resources/post_resource.rb', /class PostResource < JSONAPI::Resource/ end + test "resource is singular" do + run_generator ["posts"] + assert_file 'app/resources/post_resource.rb', /class PostResource < JSONAPI::Resource/ + end + test "resource is created with namespace" do run_generator ["api/v1/post"] assert_file 'app/resources/api/v1/post_resource.rb', /class Api::V1::PostResource < JSONAPI::Resource/ end end