Skip to content

Commit 9ed5796

Browse files
authored
Flatten tests in annotation_builder_spec.rb (#51)
The `model_annotator/annotation_builder_spec.rb` contained a LOT of the tests from the original gem. This PR attempts to flatten the original tests and make it easier to understand. After this, it should be easier to extract tests into their proper places.
1 parent 0e9f301 commit 9ed5796

File tree

2 files changed

+1926
-1675
lines changed

2 files changed

+1926
-1675
lines changed

lib/annotate_rb/model_annotator/annotation_builder.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(klass, options)
1919
end
2020

2121
def build
22-
@info = "# #{header}\n"
22+
@info = "#{header}\n"
2323
@info += schema_header_text
2424

2525
max_size = @model.max_schema_info_width
@@ -51,6 +51,7 @@ def build
5151

5252
def header
5353
header = @options[:format_markdown] ? PREFIX_MD.dup : PREFIX.dup
54+
header = "# #{header}"
5455
version = begin
5556
ActiveRecord::Migrator.current_version
5657
rescue

0 commit comments

Comments
 (0)