Skip to content

Commit

Permalink
fixup! Abstract model classes should be skipped without warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickcharlton committed May 8, 2017
1 parent 9b95ad1 commit a5720b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/generators/routes_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class ModelWithoutDBTable < ActiveRecord::Base; end
output = run_generator

expect(routes).not_to contain("model_without_db_table")
expect(output).to include("WARNING: Unable to generate a dashboard for ModelWithoutDBTable")
expect(output).to include <<-MSG
WARNING: Unable to generate a dashboard for ModelWithoutDBTable
MSG
ensure
remove_constants :ModelWithoutDBTable
end
Expand Down Expand Up @@ -82,7 +84,9 @@ class AbstractModel < ActiveRecord::Base
output = run_generator

expect(routes).not_to contain("abstract_model")
expect(output).not_to include("WARNING: Unable to generate a dashboard for AbstractModel")
expect(output).not_to include <<-MSG
WARNING: Unable to generate a dashboard for AbstractModel
MSG
end
end
end
Expand Down

0 comments on commit a5720b3

Please sign in to comment.