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
12745c45
Commit
12745c45
authored
Jul 22, 2010
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a step to compare actual images
parent
88b616e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletions
+7
-1
features/rails.feature
+1
-0
features/step_definitions/html_steps.rb
+5
-0
features/step_definitions/rails_steps.rb
+1
-1
No files found.
features/rails.feature
View file @
12745c45
...
...
@@ -31,3 +31,4 @@ Feature: Running paperclip in a Rails app
And
I press
"Submit"
Then I should see "Name
:
something"
And
I should see an image with a path of
"/system/avatars/1/original/5k.png"
And
the file at
"/system/avatars/1/original/5k.png"
is the same as
"test/fixtures/5k.png"
features/step_definitions/html_steps.rb
View file @
12745c45
Then
%r{I should see an image with a path of "([^"]*)"}
do
|
path
|
page
.
should
have_css
(
"img[src^='
#{
path
}
']"
)
end
Then
%r{^the file at "([^"]*)" is the same as "([^"]*)"$}
do
|
web_file
,
path
|
visit
(
web_file
)
page
.
body
.
should
==
IO
.
read
(
path
)
end
features/step_definitions/rails_steps.rb
View file @
12745c45
...
...
@@ -24,7 +24,7 @@ end
When
%r{the rails application is running}
do
Dir
.
chdir
(
CUC_RAILS_ROOT
)
do
require
"config/environment"
Capybara
.
app
=
ActionController
::
Dispatcher
.
new
require
"capybara/rails"
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