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
Hide 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|
[
"
#{
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
...
...
@@ -99,6 +99,6 @@ Then /^I should not have attachment columns for "([^"]*)"$/ do |attachment_name|
[
"
#{
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
features/step_definitions/web_steps.rb
View file @
a424b82d
...
...
@@ -164,7 +164,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, pa
with_scope
(
parent
)
do
field_checked
=
find_field
(
label
)[
'checked'
]
if
field_checked
.
respond_to?
:should
field_checked
.
should
be_
true
field_checked
.
should
eq
true
else
assert
field_checked
end
...
...
@@ -175,7 +175,7 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label
with_scope
(
parent
)
do
field_checked
=
find_field
(
label
)[
'checked'
]
if
field_checked
.
respond_to?
:should
field_checked
.
should
be_
false
field_checked
.
should
eq
false
else
assert
!
field_checked
end
...
...
spec/paperclip/attachment_spec.rb
View file @
a424b82d
...
...
@@ -78,10 +78,10 @@ describe Paperclip::Attachment do
attachment
=
Paperclip
::
Attachment
.
new
(
:name
,
:instance
,
url_generator:
mock_url_generator_builder
)
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
)
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
it
"passes the style and options through to the URL generator on #url"
do
...
...
@@ -89,7 +89,7 @@ describe Paperclip::Attachment do
attachment
=
Paperclip
::
Attachment
.
new
(
:name
,
:instance
,
url_generator:
mock_url_generator_builder
)
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
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