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
e703662f
Commit
e703662f
authored
May 23, 2011
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that Paperclip is working well with Rails 3.1.0.rc1
parent
73ee9b8f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
test/helper.rb
+2
-0
test/matchers/validate_attachment_content_type_matcher_test.rb
+0
-0
test/paperclip_test.rb
+2
-2
No files found.
test/helper.rb
View file @
e703662f
...
@@ -67,6 +67,7 @@ end
...
@@ -67,6 +67,7 @@ end
def
rebuild_model
options
=
{}
def
rebuild_model
options
=
{}
ActiveRecord
::
Base
.
connection
.
create_table
:dummies
,
:force
=>
true
do
|
table
|
ActiveRecord
::
Base
.
connection
.
create_table
:dummies
,
:force
=>
true
do
|
table
|
table
.
column
:title
,
:string
table
.
column
:other
,
:string
table
.
column
:other
,
:string
table
.
column
:avatar_file_name
,
:string
table
.
column
:avatar_file_name
,
:string
table
.
column
:avatar_content_type
,
:string
table
.
column
:avatar_content_type
,
:string
...
@@ -85,6 +86,7 @@ def rebuild_class options = {}
...
@@ -85,6 +86,7 @@ def rebuild_class options = {}
include
Paperclip
::
Glue
include
Paperclip
::
Glue
has_attached_file
:avatar
,
options
has_attached_file
:avatar
,
options
end
end
Dummy
.
reset_column_information
end
end
class
FakeModel
class
FakeModel
...
...
test/matchers/validate_attachment_content_type_matcher_test.rb
View file @
e703662f
test/paperclip_test.rb
View file @
e703662f
...
@@ -193,7 +193,7 @@ class PaperclipTest < Test::Unit::TestCase
...
@@ -193,7 +193,7 @@ class PaperclipTest < Test::Unit::TestCase
@dummy
.
valid?
@dummy
.
valid?
end
end
should
"not have an error when assigned a valid file"
do
should
"not have an error when assigned a valid file"
do
assert_equal
0
,
@dummy
.
errors
.
length
,
@dummy
.
errors
.
full_messages
.
join
(
", "
)
assert_equal
0
,
@dummy
.
errors
.
size
,
@dummy
.
errors
.
full_messages
.
join
(
", "
)
end
end
end
end
context
"and assigned an invalid file"
do
context
"and assigned an invalid file"
do
...
@@ -202,7 +202,7 @@ class PaperclipTest < Test::Unit::TestCase
...
@@ -202,7 +202,7 @@ class PaperclipTest < Test::Unit::TestCase
@dummy
.
valid?
@dummy
.
valid?
end
end
should
"have an error when assigned a valid file"
do
should
"have an error when assigned a valid file"
do
assert
@dummy
.
errors
.
length
>
0
assert
@dummy
.
errors
.
size
>
0
end
end
end
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