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
ba7cf296
Commit
ba7cf296
authored
Feb 06, 2015
by
Agustin Cavilliotti
Committed by
Jon Yurek
Feb 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Taking care of @houndci comments, but not sure to which line specificaly is referring too :)
parent
e4c04c2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
spec/paperclip/attachment_registry_spec.rb
+12
-12
No files found.
spec/paperclip/attachment_registry_spec.rb
View file @
ba7cf296
...
...
@@ -31,8 +31,8 @@ describe 'Attachment Registry' do
it
'calls the block with the class, attachment name, and options'
do
foo
=
Class
.
new
expected_accumulations
=
[
[
foo
,
:avatar
,
{
yo:
'greeting'
}],
[
foo
,
:greeter
,
{
ciao:
'greeting'
}]
[
foo
,
:avatar
,
{
yo:
"greeting"
}],
[
foo
,
:greeter
,
{
ciao:
"greeting"
}]
]
expected_accumulations
.
each
do
|
args
|
Paperclip
::
AttachmentRegistry
.
register
(
*
args
)
...
...
@@ -50,19 +50,19 @@ describe 'Attachment Registry' do
context
'.definitions_for'
do
it
'produces the attachment name and options'
do
expected_definitions
=
{
avatar:
{
yo:
'greeting'
},
greeter:
{
ciao:
'greeting'
}
avatar:
{
yo:
"greeting"
},
greeter:
{
ciao:
"greeting"
}
}
foo
=
Class
.
new
Paperclip
::
AttachmentRegistry
.
register
(
foo
,
:avatar
,
{
yo:
'greeting'
}
yo:
"greeting"
)
Paperclip
::
AttachmentRegistry
.
register
(
foo
,
:greeter
,
{
ciao:
'greeting'
}
ciao:
"greeting"
)
definitions
=
Paperclip
::
AttachmentRegistry
.
definitions_for
(
foo
)
...
...
@@ -71,7 +71,7 @@ describe 'Attachment Registry' do
end
it
'produces defintions for subclasses'
do
expected_definitions
=
{
avatar:
{
yo:
'greeting'
}
}
expected_definitions
=
{
avatar:
{
yo:
"greeting"
}
}
foo
=
Class
.
new
bar
=
Class
.
new
(
foo
)
Paperclip
::
AttachmentRegistry
.
register
(
...
...
@@ -86,12 +86,12 @@ describe 'Attachment Registry' do
end
it
'produces defintions for subclasses but deep merging them'
do
foo_definitions
=
{
avatar:
{
yo:
'greeting'
}
}
bar_definitions
=
{
avatar:
{
ciao:
'greeting'
}
}
foo_definitions
=
{
avatar:
{
yo:
"greeting"
}
}
bar_definitions
=
{
avatar:
{
ciao:
"greeting"
}
}
expected_definitions
=
{
avatar:
{
yo:
'greeting'
,
ciao:
'greeting'
yo:
"greeting"
,
ciao:
"greeting"
}
}
foo
=
Class
.
new
...
...
@@ -118,7 +118,7 @@ describe 'Attachment Registry' do
foo
=
Class
.
new
Paperclip
::
AttachmentRegistry
.
register
(
foo
,
:greeter
,
{
ciao:
'greeting'
})
{
ciao:
"greeting"
})
Paperclip
::
AttachmentRegistry
.
clear
...
...
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