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
a424b82d
Commit
a424b82d
authored
Jun 27, 2014
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted some be_trues and be_falses
parent
9294b4be
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
features/step_definitions/attachment_steps.rb
+2
-2
features/step_definitions/web_steps.rb
+2
-2
spec/paperclip/attachment_spec.rb
+3
-3
No files found.
features/step_definitions/attachment_steps.rb
View file @
a424b82d
...
@@ -85,7 +85,7 @@ Then /^I should have attachment columns for "([^"]*)"$/ do |attachment_name|
...
@@ -85,7 +85,7 @@ Then /^I should have attachment columns for "([^"]*)"$/ do |attachment_name|
[
"
#{
attachment_name
}
_updated_at"
,
:datetime
]
[
"
#{
attachment_name
}
_updated_at"
,
:datetime
]
]
]
expect_columns
.
all?
{
|
column
|
columns
.
include?
column
}.
should
be_
true
expect_columns
.
all?
{
|
column
|
columns
.
include?
column
}.
should
eq
true
end
end
end
end
...
@@ -99,6 +99,6 @@ Then /^I should not have attachment columns for "([^"]*)"$/ do |attachment_name|
...
@@ -99,6 +99,6 @@ Then /^I should not have attachment columns for "([^"]*)"$/ do |attachment_name|
[
"
#{
attachment_name
}
_updated_at"
,
:datetime
]
[
"
#{
attachment_name
}
_updated_at"
,
:datetime
]
]
]
expect_columns
.
none?
{
|
column
|
columns
.
include?
column
}.
should
be_
true
expect_columns
.
none?
{
|
column
|
columns
.
include?
column
}.
should
eq
true
end
end
end
end
features/step_definitions/web_steps.rb
View file @
a424b82d
...
@@ -164,7 +164,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, pa
...
@@ -164,7 +164,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, pa
with_scope
(
parent
)
do
with_scope
(
parent
)
do
field_checked
=
find_field
(
label
)[
'checked'
]
field_checked
=
find_field
(
label
)[
'checked'
]
if
field_checked
.
respond_to?
:should
if
field_checked
.
respond_to?
:should
field_checked
.
should
be_
true
field_checked
.
should
eq
true
else
else
assert
field_checked
assert
field_checked
end
end
...
@@ -175,7 +175,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label
...
@@ -175,7 +175,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label
with_scope
(
parent
)
do
with_scope
(
parent
)
do
field_checked
=
find_field
(
label
)[
'checked'
]
field_checked
=
find_field
(
label
)[
'checked'
]
if
field_checked
.
respond_to?
:should
if
field_checked
.
respond_to?
:should
field_checked
.
should
be_
false
field_checked
.
should
eq
false
else
else
assert
!
field_checked
assert
!
field_checked
end
end
...
...
spec/paperclip/attachment_spec.rb
View file @
a424b82d
...
@@ -78,10 +78,10 @@ describe Paperclip::Attachment do
...
@@ -78,10 +78,10 @@ describe Paperclip::Attachment do
attachment
=
Paperclip
::
Attachment
.
new
(
:name
,
:instance
,
url_generator:
mock_url_generator_builder
)
attachment
=
Paperclip
::
Attachment
.
new
(
:name
,
:instance
,
url_generator:
mock_url_generator_builder
)
attachment
.
url
(
:style_name
,
true
)
attachment
.
url
(
:style_name
,
true
)
expect
(
mock_url_generator_builder
.
has_generated_url_with_options?
(
timestamp:
true
,
escape:
true
)).
to
be_
true
expect
(
mock_url_generator_builder
.
has_generated_url_with_options?
(
timestamp:
true
,
escape:
true
)).
to
eq
true
attachment
.
url
(
:style_name
,
false
)
attachment
.
url
(
:style_name
,
false
)
expect
(
mock_url_generator_builder
.
has_generated_url_with_options?
(
timestamp:
false
,
escape:
true
)).
to
be_
true
expect
(
mock_url_generator_builder
.
has_generated_url_with_options?
(
timestamp:
false
,
escape:
true
)).
to
eq
true
end
end
it
"passes the style and options through to the URL generator on #url"
do
it
"passes the style and options through to the URL generator on #url"
do
...
@@ -89,7 +89,7 @@ describe Paperclip::Attachment do
...
@@ -89,7 +89,7 @@ describe Paperclip::Attachment do
attachment
=
Paperclip
::
Attachment
.
new
(
:name
,
:instance
,
url_generator:
mock_url_generator_builder
)
attachment
=
Paperclip
::
Attachment
.
new
(
:name
,
:instance
,
url_generator:
mock_url_generator_builder
)
attachment
.
url
(
:style_name
,
options: :values
)
attachment
.
url
(
:style_name
,
options: :values
)
expect
(
mock_url_generator_builder
.
has_generated_url_with_options?
(
options: :values
)).
to
be_
true
expect
(
mock_url_generator_builder
.
has_generated_url_with_options?
(
options: :values
)).
to
eq
true
end
end
it
"passes default options through when #url is given one argument"
do
it
"passes default options through when #url is given one argument"
do
...
...
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