@@ -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
@@ -88,7 +86,6 @@ def mock_column(name, type, options={})
8886# b_id :integer not null
8987# name :string(50) not null
9088#
91-
9289EOS
9390 end
9491
@@ -107,7 +104,6 @@ def mock_column(name, type, options={})
107104#--
108105# #{ AnnotateModels ::END_MARK }
109106#++
110-
111107EOS
112108 end
113109
@@ -177,7 +173,7 @@ class FooWithMacro < ActiveRecord::Base
177173 EOS
178174 check_class_name 'foo_with_macro.rb' , 'FooWithMacro'
179175 end
180-
176+
181177 it "should not care about known macros" do
182178 create ( 'foo_with_known_macro.rb' , <<-EOS )
183179 class FooWithKnownMacro < ActiveRecord::Base
@@ -347,12 +343,12 @@ def annotate_one_file options = {}
347343
348344 it "should annotate the file before the model if position == 'before'" do
349345 annotate_one_file :position => "before"
350- File . read ( @model_file_name ) . should == "#{ @schema_info } #{ @file_content } "
346+ File . read ( @model_file_name ) . should == "#{ @schema_info } \n #{ @file_content } "
351347 end
352348
353349 it "should annotate before if given :position => :before" do
354350 annotate_one_file :position => :before
355- File . read ( @model_file_name ) . should == "#{ @schema_info } #{ @file_content } "
351+ File . read ( @model_file_name ) . should == "#{ @schema_info } \n #{ @file_content } "
356352 end
357353
358354 it "should annotate after if given :position => :after" do
@@ -384,7 +380,7 @@ class Foo::User < ActiveRecord::Base
384380 ] )
385381 schema_info = AnnotateModels . get_schema_info ( klass , "== Schema Info" )
386382 AnnotateModels . annotate_one_file ( model_file_name , schema_info , :position => :before )
387- File . read ( model_file_name ) . should == "#{ schema_info } #{ file_content } "
383+ File . read ( model_file_name ) . should == "#{ schema_info } \n #{ file_content } "
388384 end
389385
390386 describe "if a file can't be annotated" do
0 commit comments