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
3b99151b
Commit
3b99151b
authored
Mar 21, 2014
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only run metaclass specs if AS > 4.1 or Ruby < 2.1
parent
de693b41
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
Gemfile
+2
-0
spec/paperclip/meta_class_spec.rb
+2
-0
spec/spec_helper.rb
+3
-0
spec/support/version_helper.rb
+9
-0
No files found.
Gemfile
View file @
3b99151b
...
...
@@ -10,6 +10,8 @@ gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
gem
'
rubysl
'
,
:platforms
=>
:rbx
gem
'
racc
'
,
:platforms
=>
:rbx
gem
'
pry
'
# Hinting at development dependencies
# Prevents bundler from taking a long-time to resolve
group
:development
,
:test
do
...
...
spec/paperclip/meta_class_spec.rb
View file @
3b99151b
...
...
@@ -2,6 +2,7 @@ require 'spec_helper'
describe
'Metaclasses'
do
context
"A meta-class of dummy"
do
if
active_support_version
>=
"4.1"
||
ruby_version
<
"2.1"
before
do
rebuild_model
(
"Dummy"
)
reset_class
(
"Dummy"
)
...
...
@@ -25,4 +26,5 @@ describe 'Metaclasses' do
assert
@dummy
.
save
end
end
end
end
spec/spec_helper.rb
View file @
3b99151b
...
...
@@ -10,6 +10,8 @@ require 'ostruct'
ROOT
=
Pathname
(
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'..'
)))
puts
"Testing against version
#{
ActiveRecord
::
VERSION
::
STRING
}
"
$LOAD_PATH
<<
File
.
join
(
ROOT
,
'lib'
)
$LOAD_PATH
<<
File
.
join
(
ROOT
,
'lib'
,
'paperclip'
)
require
File
.
join
(
ROOT
,
'lib'
,
'paperclip.rb'
)
...
...
@@ -29,6 +31,7 @@ RSpec.configure do |config|
config
.
include
Assertions
config
.
include
ModelReconstruction
config
.
include
TestData
config
.
extend
VersionHelper
config
.
extend
RailsHelpers
::
ClassMethods
config
.
mock_framework
=
:mocha
config
.
before
(
:all
)
do
...
...
spec/support/version_helper.rb
0 → 100644
View file @
3b99151b
module
VersionHelper
def
active_support_version
ActiveSupport
::
VERSION
::
STRING
end
def
ruby_version
RUBY_VERSION
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