Commit 00834c01 by tady

test pass

parent eeb8d215
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
......@@ -36,7 +36,7 @@ $ bundle exec rake db:seed
Set ENV before start server.
```
$ . .env
$ source .env
$ bundle exec rails s
```
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment