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
54093c67
Commit
54093c67
authored
May 29, 2011
by
Pavel Forkert
Committed by
Prem Sichanugrist
Jun 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for raising error when there is no class in specified namespace
parent
119a44b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
test/paperclip_test.rb
+8
-0
No files found.
test/paperclip_test.rb
View file @
54093c67
...
@@ -42,6 +42,14 @@ class PaperclipTest < Test::Unit::TestCase
...
@@ -42,6 +42,14 @@ class PaperclipTest < Test::Unit::TestCase
assert_equal
::
One
::
Two
,
Paperclip
.
class_for
(
"One::Two"
)
assert_equal
::
One
::
Two
,
Paperclip
.
class_for
(
"One::Two"
)
end
end
should
"raise when class doesn't exist in specified namespace"
do
class
::
Three
;
end
class
::
Four
;
end
assert_raise
NameError
do
Paperclip
.
class_for
(
"Three::Four"
)
end
end
context
"An ActiveRecord model with an 'avatar' attachment"
do
context
"An ActiveRecord model with an 'avatar' attachment"
do
setup
do
setup
do
rebuild_model
:path
=>
"tmp/:class/omg/:style.:extension"
rebuild_model
:path
=>
"tmp/:class/omg/:style.:extension"
...
...
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