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
3401f954
Commit
3401f954
authored
Jun 20, 2010
by
fistfvck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec
parent
a90dd234
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+4
-2
No files found.
spec/annotate/annotate_models_spec.rb
View file @
3401f954
...
...
@@ -9,6 +9,7 @@ describe AnnotateModels do
require
"tmpdir"
@dir
=
Dir
.
tmpdir
+
"/
#{
Time
.
now
.
to_i
}
"
+
"/annotate_models"
FileUtils
.
mkdir_p
(
@dir
)
AnnotateModels
.
model_dir
=
@dir
end
module
::
ActiveRecord
...
...
@@ -51,8 +52,7 @@ describe AnnotateModels do
#
EOS
AnnotateModels
.
model_dir
=
@dir
@user_file
=
create
(
'user.rb'
,
<<-
EOS
)
class User < ActiveRecord::Base
end
...
...
@@ -73,6 +73,7 @@ end
end
it
"should write the schema before (default)"
do
ARGV
.
stub!
(
:dup
).
and_return
[]
AnnotateModels
.
stub!
(
:get_schema_info
).
and_return
@schema_info
AnnotateModels
.
do_annotations
File
.
read
(
@user_file
).
should
eql
(
<<-
EOF
)
...
...
@@ -91,6 +92,7 @@ EOF
end
it
"should write the schema after"
do
ARGV
.
stub!
(
:dup
).
and_return
[]
AnnotateModels
.
stub!
(
:get_schema_info
).
and_return
@schema_info
AnnotateModels
.
do_annotations
(
:position
=>
:after
)
File
.
read
(
@user_file
).
should
eql
(
<<-
EOF
)
...
...
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