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
85d9af49
Commit
85d9af49
authored
Jan 26, 2016
by
kevcha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove attr_protected related specs (was removed in rails 4)
parent
4b5a364a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
35 deletions
+0
-35
spec/paperclip/paperclip_spec.rb
+0
-27
spec/spec_helper.rb
+0
-1
spec/support/rails_helpers.rb
+0
-7
No files found.
spec/paperclip/paperclip_spec.rb
View file @
85d9af49
...
@@ -123,33 +123,6 @@ describe Paperclip do
...
@@ -123,33 +123,6 @@ describe Paperclip do
end
end
end
end
if
using_protected_attributes?
context
"that is attr_protected"
do
before
do
Dummy
.
class_eval
do
attr_protected
:avatar
end
@dummy
=
Dummy
.
new
end
it
"does not assign the avatar on mass-set"
do
@dummy
.
attributes
=
{
other:
"I'm set!"
,
avatar:
@file
}
assert_equal
"I'm set!"
,
@dummy
.
other
assert
!
@dummy
.
avatar?
end
it
"allows assigment on normal set"
do
@dummy
.
other
=
"I'm set!"
@dummy
.
avatar
=
@file
assert_equal
"I'm set!"
,
@dummy
.
other
assert
@dummy
.
avatar?
end
end
end
context
"with a subclass"
do
context
"with a subclass"
do
before
do
before
do
class
::
SubDummy
<
Dummy
;
end
class
::
SubDummy
<
Dummy
;
end
...
...
spec/spec_helper.rb
View file @
85d9af49
...
@@ -37,7 +37,6 @@ RSpec.configure do |config|
...
@@ -37,7 +37,6 @@ RSpec.configure do |config|
config
.
include
ModelReconstruction
config
.
include
ModelReconstruction
config
.
include
TestData
config
.
include
TestData
config
.
extend
VersionHelper
config
.
extend
VersionHelper
config
.
extend
RailsHelpers
::
ClassMethods
config
.
mock_framework
=
:mocha
config
.
mock_framework
=
:mocha
config
.
before
(
:all
)
do
config
.
before
(
:all
)
do
rebuild_model
rebuild_model
...
...
spec/support/rails_helpers.rb
deleted
100644 → 0
View file @
4b5a364a
module
RailsHelpers
module
ClassMethods
def
using_protected_attributes?
ActiveRecord
::
VERSION
::
MAJOR
<
4
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