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
108fe47e
Commit
108fe47e
authored
Apr 25, 2015
by
soramugi
Committed by
Jon Yurek
Apr 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rspec2 support
parent
3fbda79f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
spec/support/matchers/have_column.rb
+8
-2
No files found.
spec/support/matchers/have_column.rb
View file @
108fe47e
...
...
@@ -8,7 +8,13 @@ RSpec::Matchers.define :have_column do |column_name|
column
&&
column
.
default
.
to_s
==
@default
.
to_s
end
failure_message
do
|
columns
|
"expected to find '
#{
column_name
}
', default '
#{
@default
}
' in
#{
columns
.
map
{
|
column
|
[
column
.
name
,
column
.
default
]
}
}"
if
RSpec
::
Version
::
STRING
.
to_i
>=
3
failure_message
do
|
columns
|
"expected to find '
#{
column_name
}
', default '
#{
@default
}
' in
#{
columns
.
map
{
|
column
|
[
column
.
name
,
column
.
default
]
}
}"
end
else
failure_message_for_should
do
|
columns
|
"expected to find '
#{
column_name
}
', default '
#{
@default
}
' in
#{
columns
.
map
{
|
column
|
[
column
.
name
,
column
.
default
]
}
}"
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