Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
5810d861
Commit
5810d861
authored
Mar 11, 2010
by
Andrea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added specdoc format to opts, started adding spec for utf-8 strings in model files
parent
99956b59
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+11
-0
spec.opts
spec/spec.opts
+2
-0
No files found.
spec/annotate/annotate_models_spec.rb
View file @
5810d861
#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
spec/spec.opts
View file @
5810d861
--format=specdoc
--colour
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment