Commit efe98369 by fistfvck

Merge remote branch 'adamico/master' into restart

Conflicts: annotate.gemspec spec/annotate/annotate_models_spec.rb
parents 3401f954 adf57a45
...@@ -9,7 +9,7 @@ Gem::Specification.new do |s| ...@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"] s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"]
s.date = %q{2009-12-14} s.date = %q{2010-03-11}
s.default_executable = %q{annotate} s.default_executable = %q{annotate}
s.description = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.} s.description = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com"] s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com"]
......
#encoding: utf-8
require File.dirname(__FILE__) + '/../spec_helper.rb' require File.dirname(__FILE__) + '/../spec_helper.rb'
require 'annotate/annotate_models' require 'annotate/annotate_models'
require 'rubygems' require 'rubygems'
require 'activesupport' require 'active_support'
describe AnnotateModels do describe AnnotateModels do
...@@ -124,6 +125,12 @@ EOF ...@@ -124,6 +125,12 @@ EOF
acts_as_awesome :yah acts_as_awesome :yah
end end
EOS EOS
create('foo_with_utf8.rb', <<-EOS)
#encoding: utf-8
class FooWithUtf8 < ActiveRecord::Base
UTF8STRINGS = %w[résumé façon âge]
end
EOS
end end
it "should work" do it "should work" do
...@@ -136,6 +143,10 @@ EOF ...@@ -136,6 +143,10 @@ EOF
klass.name.should == "FooWithMacro" klass.name.should == "FooWithMacro"
end 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
end end
--format=specdoc
--colour --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