Add Style enforcer (via Rubocop)

It will fail the build, but as it is currently,
most of the cops are 'todos'. Great for new contributors.. :)
This commit is contained in:
Benjamin Fleischer
2015-08-30 23:17:25 -05:00
parent 6784866a2d
commit 09c97de90d
12 changed files with 430 additions and 10 deletions

View File

@@ -1,4 +1,3 @@
require 'test_helper'
module ActionController
@@ -189,7 +188,7 @@ module ActionController
def test_render_array_using_custom_root
get :render_array_using_custom_root
expected = {custom_roots: [{name: "Name 1", description: "Description 1"}]}
expected = {custom_roots: [{name: "Name 1", description: "Description 1"}]}
assert_equal 'application/json', @response.content_type
assert_equal expected.to_json, @response.body
end
@@ -197,7 +196,7 @@ module ActionController
def test_render_array_that_is_empty_using_custom_root
get :render_array_that_is_empty_using_custom_root
expected = {custom_roots: []}
expected = {custom_roots: []}
assert_equal 'application/json', @response.content_type
assert_equal expected.to_json, @response.body
end
@@ -205,7 +204,7 @@ module ActionController
def test_render_object_using_custom_root
get :render_object_using_custom_root
expected = {custom_root: {name: "Name 1", description: "Description 1"}}
expected = {custom_root: {name: 'Name 1', description: 'Description 1'}}
assert_equal 'application/json', @response.content_type
assert_equal expected.to_json, @response.body
end