Commit 28916f44 by Marcos Piccinini

defaults to after the code

parent 11b1951d
......@@ -114,7 +114,7 @@ module AnnotateModels
old_content.sub!(/^# #{COMPAT_PREFIX}.*?\n(#.*\n)*\n/, '')
# Write it back
new_content = ((options[:position] || :before).to_sym == :before) ? (info_block + old_content) : (old_content + "\n" + info_block)
new_content = options[:position].to_sym == :before ? (info_block + old_content) : (old_content + "\n" + info_block)
File.open(file_name, "wb") { |f| f.puts new_content }
true
......
......@@ -2,8 +2,7 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
describe Annotate do
it "should have a version" do
Annotate::VERSION.should be_instance_of(String)
it "should have more tests..heh" do
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment