Skip to content

Improve specs #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 15, 2017
Merged

Improve specs #33

merged 5 commits into from
Jul 15, 2017

Conversation

beauby
Copy link
Member

@beauby beauby commented Jul 15, 2017

No description provided.

@@ -0,0 +1,11 @@
require 'rails_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing magic comment # frozen_string_literal: true.

it 'exposes the deserialization mapping via the jsonapi_pointers method' do
pointers = { id: '/data/id', type: '/data/type' }
describe ActionController::Base, type: :controller do
context 'when specifying a deserializable resource' do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block has too many lines. [28/25]

RSpec.describe ActionController::Base do
it 'exposes the deserialization mapping via the jsonapi_pointers method' do
pointers = { id: '/data/id', type: '/data/type' }
describe ActionController::Base, type: :controller do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block has too many lines. [30/25]

'data' => {
'id' => '1',
'type' => 'users',
'attributes' => { 'name' => 'Lucas' } }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing hash brace must be on the line after the last hash element when opening brace is on a separate line from the first hash element.

env: {
JSONAPI::Rails::ActionController::JSONAPI_POINTERS_KEY => pointers
describe ActionController::Base, type: :controller do
describe '.deserializable_resource' do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block has too many lines. [28/25]

OpenStruct.new(
env: {
JSONAPI::Rails::ActionController::JSONAPI_POINTERS_KEY => pointers
describe ActionController::Base, type: :controller do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block has too many lines. [56/25]

OpenStruct.new(
env: {
JSONAPI::Rails::ActionController::JSONAPI_POINTERS_KEY => pointers
describe ActionController::Base, type: :controller do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block has too many lines. [57/25]

@beauby beauby merged commit a8d47c2 into master Jul 15, 2017
@beauby beauby deleted the improve-specs branch July 15, 2017 04:35
mdeutsch pushed a commit to patientslikeme/jsonapi-rails that referenced this pull request Jul 21, 2017
* upstream/master:
  Improve specs (jsonapi-rb#33)
  Expose deserialization reverse mapping in controllers (jsonapi-rb#29)
  Update jsonapi-rb to v0.2.1. (jsonapi-rb#32)
  Add dummy app temp files to .gitignore (jsonapi-rb#30)
  Deal with jsonapi-serializable no longer calling to_json (jsonapi-rb#26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants