@@ -51,7 +51,6 @@ def mock_column(name, type, options={})
5151# id :integer not null, primary key
5252# name :string(50) not null
5353#
54-
5554EOS
5655 end
5756
@@ -69,7 +68,6 @@ def mock_column(name, type, options={})
6968# id :integer not null
7069# name :string(50) not null
7170#
72-
7371EOS
7472 end
7573
@@ -89,7 +87,6 @@ def mock_column(name, type, options={})
8987# b_id :integer not null
9088# name :string(50) not null
9189#
92-
9390EOS
9491 end
9592 it "should get schema info with enum type " do
@@ -125,7 +122,6 @@ def mock_column(name, type, options={})
125122#--
126123# #{ AnnotateModels ::END_MARK }
127124#++
128-
129125EOS
130126 end
131127
@@ -195,7 +191,7 @@ class FooWithMacro < ActiveRecord::Base
195191 EOS
196192 check_class_name 'foo_with_macro.rb' , 'FooWithMacro'
197193 end
198-
194+
199195 it "should not care about known macros" do
200196 create ( 'foo_with_known_macro.rb' , <<-EOS )
201197 class FooWithKnownMacro < ActiveRecord::Base
@@ -365,12 +361,12 @@ def annotate_one_file options = {}
365361
366362 it "should annotate the file before the model if position == 'before'" do
367363 annotate_one_file :position => "before"
368- File . read ( @model_file_name ) . should == "#{ @schema_info } #{ @file_content } "
364+ File . read ( @model_file_name ) . should == "#{ @schema_info } \n #{ @file_content } "
369365 end
370366
371367 it "should annotate before if given :position => :before" do
372368 annotate_one_file :position => :before
373- File . read ( @model_file_name ) . should == "#{ @schema_info } #{ @file_content } "
369+ File . read ( @model_file_name ) . should == "#{ @schema_info } \n #{ @file_content } "
374370 end
375371
376372 it "should annotate after if given :position => :after" do
@@ -402,7 +398,7 @@ class Foo::User < ActiveRecord::Base
402398 ] )
403399 schema_info = AnnotateModels . get_schema_info ( klass , "== Schema Info" )
404400 AnnotateModels . annotate_one_file ( model_file_name , schema_info , :position => :before )
405- File . read ( model_file_name ) . should == "#{ schema_info } #{ file_content } "
401+ File . read ( model_file_name ) . should == "#{ schema_info } \n #{ file_content } "
406402 end
407403
408404 describe "if a file can't be annotated" do
0 commit comments