Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
00834c01
Commit
00834c01
authored
Jan 17, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test pass
parent
eeb8d215
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
16 deletions
+31
-16
Guardfile
+28
-13
README.md
+1
-1
spec/features/posts_spec.rb
+2
-2
No files found.
Guardfile
View file @
00834c01
guard
:rspec
,
all_after_pass:
true
,
spring
:
true
do
watch
(
%r{^spec/.+_spec
\.
rb$}
)
watch
(
%r{^lib/(.+)
\.
rb$}
)
{
|
m
|
"spec/lib/
#{
m
[
1
]
}
_spec.rb"
}
watch
(
'spec/spec_helper.rb'
)
{
'spec'
}
# guard :rspec, all_after_pass
: true do
#
watch(%r{^spec/.+_spec\.rb$})
#
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
#
watch('spec/spec_helper.rb') { 'spec' }
watch
(
%r{^app/(.+)
\.
rb$}
)
{
|
m
|
"spec/
#{
m
[
1
]
}
_spec.rb"
}
watch
(
%r{^app/(.*)(
\.
erb|
\.
haml)$}
)
{
|
m
|
"spec/
#{
m
[
1
]
}#{
m
[
2
]
}
_spec.rb"
}
watch
(
%r{^app/(.*)(
\.
erb|
\.
haml)$}
)
{
'spec/features'
}
watch
(
%r{^spec/factories/(.+)
\.
rb$}
)
{
'spec/factories_spec.rb'
}
watch
(
%r{^spec/support/(.+)
\.
rb$}
)
{
'spec'
}
watch
(
'config/routes.rb'
)
{
'spec/routing'
}
watch
(
'app/controllers/application_controller.rb'
)
{
'spec/controllers'
}
end
# watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
# watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
# watch(%r{^app/(.*)(\.erb|\.haml)$}) { 'spec/features' }
# watch(%r{^spec/factories/(.+)\.rb$}) { 'spec/factories_spec.rb' }
# watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
# watch('config/routes.rb') { 'spec/routing' }
# watch('app/controllers/application_controller.rb') { 'spec/controllers' }
# end
# guard :rubocop, all_after_pass: true, cli: ['--rails', '--auto-correct'] do
# watch(%r{.+\.rb$})
# watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
# end
guard
:rubocop
,
all_after_pass:
true
,
cli:
[
'--rails'
,
'--auto-correct'
]
do
guard
:rubocop
do
watch
(
%r{.+
\.
rb$}
)
watch
(
%r{(?:.+/)?
\.
rubocop
\.
yml$}
)
{
|
m
|
File
.
dirname
(
m
[
0
])
}
end
guard
:rspec
do
watch
(
%r{^spec/.+_spec
\.
rb$}
)
watch
(
%r{^spec/spec_helper
\.
rb$}
)
{
|
m
|
'spec'
}
watch
(
%r{^app/(.+)
\.
rb$}
)
{
|
m
|
"spec/
#{
m
[
1
]
}
_spec.rb"
}
watch
(
%r{^lib/(.+)
\.
rb$}
)
{
|
m
|
"spec/lib/
#{
m
[
1
]
}
_spec.rb"
}
watch
(
%r{^app/controllers/(.+)_(controller)
\.
rb$}
)
do
|
m
|
%W(spec/routing/
#{
m
[
1
]
}
_routing_spec.rb spec/
#{
m
[
2
]
}
s/
#{
m
[
1
]
}
_
#{
m
[
2
]
}
_spec.rb spec/requests/
#{
m
[
1
]
}
_spec.rb)
end
end
README.md
View file @
00834c01
...
...
@@ -36,7 +36,7 @@ $ bundle exec rake db:seed
Set ENV before start server.
```
$
.
.env
$
source
.env
$ bundle exec rails s
```
...
...
spec/features/posts_spec.rb
View file @
00834c01
...
...
@@ -20,13 +20,13 @@ describe 'Request via js', js: true do
it
'show first post'
do
page
.
save_screenshot
(
Rails
.
root
.
join
(
'tmp'
,
'screenshots'
,
"a-
#{
Time
.
now
.
strftime
(
'%Y-%m-%d %H%M%S'
)
}
.png"
))
expect
(
page
.
find
(
'
#list_post div.
title a'
).
text
).
to
include
(
'ruby rspec'
)
expect
(
page
.
find
(
'
.panel-
title a'
).
text
).
to
include
(
'ruby rspec'
)
end
it
'click post and show'
do
find
(
'.post-list:nth-child(3)'
).
click
page
.
save_screenshot
(
Rails
.
root
.
join
(
'tmp'
,
'screenshots'
,
"b-
#{
Time
.
now
.
strftime
(
'%Y-%m-%d %H%M%S'
)
}
.png"
))
expect
(
page
.
find
(
'
#list_post div.
title a'
).
text
).
to
include
(
'java java...'
)
expect
(
page
.
find
(
'
.panel-
title a'
).
text
).
to
include
(
'java java...'
)
end
after
:each
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