Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
f07487f6
Commit
f07487f6
authored
Jan 23, 2009
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#97 Fix for shoulda macros
parent
56477408
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
shoulda_macros/paperclip.rb
+6
-5
No files found.
shoulda_macros/paperclip.rb
View file @
f07487f6
...
...
@@ -31,16 +31,17 @@ module Paperclip
@attachment
.
assign
(
nil
)
end
should
"have a :presence validation error"
do
assert
@a
ssign
ment
.
errors
[
:presence
]
assert
@a
ttach
ment
.
errors
[
:presence
]
end
end
context
"when the assignment is valid"
do
setup
do
@file
=
StringIO
.
new
(
"."
)
@attachment
=
klass
.
new
.
send
(
name
)
@attachment
.
assign
(
nil
)
@attachment
.
assign
(
@file
)
end
should
"have a :presence validation error"
do
assert
!
@a
ssign
ment
.
errors
[
:presence
]
assert
!
@a
ttach
ment
.
errors
[
:presence
]
end
end
end
...
...
@@ -65,7 +66,7 @@ module Paperclip
@attachment
.
assign
(
@file
)
end
should
"not have a :content_type validation error"
do
assert
!
@a
ssign
ment
.
errors
[
:content_type
]
assert
!
@a
ttach
ment
.
errors
[
:content_type
]
end
end
end
...
...
@@ -79,7 +80,7 @@ module Paperclip
@attachment
.
assign
(
@file
)
end
should
"have a :content_type validation error"
do
assert
@a
ssign
ment
.
errors
[
:content_type
]
assert
@a
ttach
ment
.
errors
[
:content_type
]
end
end
end
...
...
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