Skip to content
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

Abstract model classes should be skipped without warning. #857

Merged
merged 1 commit into from
May 8, 2017

Conversation

nickcharlton
Copy link
Member

This is a rebased version of #582.

@nickcharlton
Copy link
Member Author

The tests are failing because we removed DelayedJob in #845. We can probably make an ApplicationRecord like Rails 5 does by default instead.

@deivid-rodriguez deivid-rodriguez mentioned this pull request May 8, 2017
@nickcharlton nickcharlton modified the milestone: v0.8.0 May 8, 2017
output = run_generator

expect(routes).not_to contain("abstract_model")
expect(output).not_to include("WARNING: Unable to generate a dashboard for AbstractModel")

Choose a reason for hiding this comment

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

Line is too long. [98/80]


expect(routes).not_to contain("model_without_db_table")
expect(output).to include("WARNING: Unable to generate a dashboard for ModelWithoutDBTable")

Choose a reason for hiding this comment

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

Line is too long. [100/80]

I’ve also clarified the existing specs by including an assertion against
the presence of a warning, so the name of the spec matches what is
actually being tested.

Use shortened syntax and strip whitespace.
@nickcharlton nickcharlton merged commit eabd77e into master May 8, 2017
@nickcharlton nickcharlton deleted the lr-abstract branch May 8, 2017 22:17

output = run_generator

expect(routes).not_to contain("abstract_model")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this always pass since you load up the routes file before running the generator?

iarie pushed a commit to iarie/administrate that referenced this pull request Jun 17, 2017
…#857)

I’ve also clarified the existing specs by including an assertion against
the presence of a warning, so the name of the spec matches what is
actually being tested.

Use shortened syntax and strip whitespace.
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.

4 participants