Commit 5810d861 by Andrea

added specdoc format to opts, started adding spec for utf-8 strings in model files

parent 99956b59
#encoding: utf-8
require File.dirname(__FILE__) + '/../spec_helper.rb'
require 'annotate/annotate_models'
require 'rubygems'
......@@ -69,6 +70,12 @@ EOS
acts_as_awesome :yah
end
EOS
create('foo_with_utf8.rb', <<-EOS)
#encoding: utf-8
class FooWithUtf8 < ActiveRecord::Base
UTF8STRINGS = %w[résumé façon âge]
end
EOS
end
it "should work" do
klass = AnnotateModels.get_model_class("foo.rb")
......@@ -78,6 +85,10 @@ EOS
klass = AnnotateModels.get_model_class("foo_with_macro.rb")
klass.name.should == "FooWithMacro"
end
it "should not complain of invalid multibyte char (USASCII)" do
klass = AnnotateModels.get_model_class("foo_with_utf8.rb")
klass.name.should == "FooWithUtf8"
end
end
end
--format=specdoc
--colour
\ No newline at end of file
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