cucumber-rails 2.2.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +86 -19
- data/README.md +4 -13
- data/lib/cucumber/rails/capybara/select_dates_and_times.rb +28 -13
- data/lib/cucumber/rails/database/deletion_strategy.rb +2 -0
- data/lib/cucumber/rails/database/null_strategy.rb +15 -0
- data/lib/cucumber/rails/database/shared_connection_strategy.rb +2 -0
- data/lib/cucumber/rails/database/strategy.rb +4 -0
- data/lib/cucumber/rails/database/truncation_strategy.rb +2 -0
- data/lib/cucumber/rails/database.rb +2 -1
- data/lib/cucumber/rails.rb +1 -0
- data/lib/generators/cucumber/install_generator.rb +13 -16
- data/lib/generators/cucumber/templates/config/cucumber.yml.erb +3 -3
- data/lib/generators/cucumber/templates/tasks/cucumber.rake.erb +5 -0
- metadata +79 -244
- data/Appraisals +0 -26
- data/Gemfile +0 -5
- data/Rakefile +0 -53
- data/bin/install_geckodriver.sh +0 -19
- data/bin/install_webpacker.sh +0 -9
- data/config/cucumber.yml +0 -17
- data/cucumber-rails.gemspec +0 -53
- data/dev_tasks/cucumber.rake +0 -5
- data/dev_tasks/rspec.rake +0 -5
- data/dev_tasks/yard/default/layout/html/bubble_32x32.png +0 -0
- data/dev_tasks/yard/default/layout/html/footer.erb +0 -5
- data/dev_tasks/yard/default/layout/html/index.erb +0 -1
- data/dev_tasks/yard/default/layout/html/layout.erb +0 -25
- data/dev_tasks/yard/default/layout/html/logo.erb +0 -1
- data/dev_tasks/yard/default/layout/html/setup.rb +0 -9
- data/dev_tasks/yard.rake +0 -28
- data/features/allow_rescue.feature +0 -66
- data/features/annotations.feature +0 -20
- data/features/capybara_javascript_drivers.feature +0 -132
- data/features/choose_javascript_database_strategy.feature +0 -125
- data/features/configuration.feature +0 -48
- data/features/database_cleaner.feature +0 -131
- data/features/disable_automatic_database_cleaning.feature +0 -49
- data/features/emulate_javascript.feature +0 -109
- data/features/install_cucumber_rails.feature +0 -14
- data/features/no_database.feature +0 -61
- data/features/raising_errors.feature +0 -22
- data/features/rerun_profile.feature +0 -47
- data/features/rest_api.feature +0 -47
- data/features/step_definitions/cucumber_rails_steps.rb +0 -80
- data/features/support/aruba.rb +0 -5
- data/features/support/cucumber_rails_helper.rb +0 -86
- data/features/support/env.rb +0 -6
- data/features/support/hooks.rb +0 -8
- data/gemfiles/rails_5_0.gemfile +0 -10
- data/gemfiles/rails_5_1.gemfile +0 -10
- data/gemfiles/rails_5_2.gemfile +0 -9
- data/gemfiles/rails_6_0.gemfile +0 -8
- data/lib/generators/cucumber/templates/support/rails_spork.rb.erb +0 -13
- data/spec/cucumber/rails/database_spec.rb +0 -74
- data/spec/examples.txt +0 -19
- data/spec/generators/cucumber/install_generator_spec.rb +0 -55
- data/spec/spec_helper.rb +0 -16
- data/tmp/aruba/test_app/Gemfile +0 -62
- data/tmp/aruba/test_app/Gemfile.lock +0 -249
- data/tmp/aruba/test_app/README.md +0 -24
- data/tmp/aruba/test_app/Rakefile +0 -6
- data/tmp/aruba/test_app/app/assets/config/manifest.js +0 -3
- data/tmp/aruba/test_app/app/assets/javascripts/application.js +0 -16
- data/tmp/aruba/test_app/app/assets/javascripts/appointments.coffee +0 -3
- data/tmp/aruba/test_app/app/assets/javascripts/cable.js +0 -13
- data/tmp/aruba/test_app/app/assets/stylesheets/application.css +0 -15
- data/tmp/aruba/test_app/app/assets/stylesheets/appointments.scss +0 -3
- data/tmp/aruba/test_app/app/assets/stylesheets/scaffolds.scss +0 -84
- data/tmp/aruba/test_app/app/channels/application_cable/channel.rb +0 -4
- data/tmp/aruba/test_app/app/channels/application_cable/connection.rb +0 -4
- data/tmp/aruba/test_app/app/controllers/application_controller.rb +0 -2
- data/tmp/aruba/test_app/app/controllers/appointments_controller.rb +0 -74
- data/tmp/aruba/test_app/app/helpers/application_helper.rb +0 -2
- data/tmp/aruba/test_app/app/helpers/appointments_helper.rb +0 -2
- data/tmp/aruba/test_app/app/jobs/application_job.rb +0 -2
- data/tmp/aruba/test_app/app/mailers/application_mailer.rb +0 -4
- data/tmp/aruba/test_app/app/models/application_record.rb +0 -3
- data/tmp/aruba/test_app/app/models/appointment.rb +0 -2
- data/tmp/aruba/test_app/app/views/appointments/_appointment.json.jbuilder +0 -2
- data/tmp/aruba/test_app/app/views/appointments/_form.html.erb +0 -27
- data/tmp/aruba/test_app/app/views/appointments/edit.html.erb +0 -6
- data/tmp/aruba/test_app/app/views/appointments/index.html.erb +0 -29
- data/tmp/aruba/test_app/app/views/appointments/index.json.jbuilder +0 -1
- data/tmp/aruba/test_app/app/views/appointments/new.html.erb +0 -5
- data/tmp/aruba/test_app/app/views/appointments/show.html.erb +0 -14
- data/tmp/aruba/test_app/app/views/appointments/show.json.jbuilder +0 -1
- data/tmp/aruba/test_app/app/views/layouts/application.html.erb +0 -15
- data/tmp/aruba/test_app/app/views/layouts/mailer.html.erb +0 -13
- data/tmp/aruba/test_app/app/views/layouts/mailer.text.erb +0 -1
- data/tmp/aruba/test_app/bin/bundle +0 -3
- data/tmp/aruba/test_app/bin/rails +0 -4
- data/tmp/aruba/test_app/bin/rake +0 -4
- data/tmp/aruba/test_app/bin/setup +0 -36
- data/tmp/aruba/test_app/bin/update +0 -31
- data/tmp/aruba/test_app/bin/yarn +0 -11
- data/tmp/aruba/test_app/config/application.rb +0 -19
- data/tmp/aruba/test_app/config/boot.rb +0 -3
- data/tmp/aruba/test_app/config/cable.yml +0 -10
- data/tmp/aruba/test_app/config/credentials.yml.enc +0 -1
- data/tmp/aruba/test_app/config/cucumber.yml +0 -9
- data/tmp/aruba/test_app/config/database.yml +0 -25
- data/tmp/aruba/test_app/config/environment.rb +0 -5
- data/tmp/aruba/test_app/config/environments/development.rb +0 -61
- data/tmp/aruba/test_app/config/environments/production.rb +0 -94
- data/tmp/aruba/test_app/config/environments/test.rb +0 -46
- data/tmp/aruba/test_app/config/initializers/application_controller_renderer.rb +0 -8
- data/tmp/aruba/test_app/config/initializers/assets.rb +0 -14
- data/tmp/aruba/test_app/config/initializers/backtrace_silencers.rb +0 -7
- data/tmp/aruba/test_app/config/initializers/content_security_policy.rb +0 -25
- data/tmp/aruba/test_app/config/initializers/cookies_serializer.rb +0 -5
- data/tmp/aruba/test_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/tmp/aruba/test_app/config/initializers/inflections.rb +0 -16
- data/tmp/aruba/test_app/config/initializers/mime_types.rb +0 -4
- data/tmp/aruba/test_app/config/initializers/wrap_parameters.rb +0 -14
- data/tmp/aruba/test_app/config/locales/en.yml +0 -33
- data/tmp/aruba/test_app/config/master.key +0 -1
- data/tmp/aruba/test_app/config/puma.rb +0 -37
- data/tmp/aruba/test_app/config/routes.rb +0 -4
- data/tmp/aruba/test_app/config/storage.yml +0 -34
- data/tmp/aruba/test_app/config.ru +0 -5
- data/tmp/aruba/test_app/db/development.sqlite3 +0 -0
- data/tmp/aruba/test_app/db/migrate/20200821080656_create_appointments.rb +0 -10
- data/tmp/aruba/test_app/db/schema.rb +0 -22
- data/tmp/aruba/test_app/db/seeds.rb +0 -7
- data/tmp/aruba/test_app/db/test.sqlite3 +0 -0
- data/tmp/aruba/test_app/features/create_appointment.feature +0 -9
- data/tmp/aruba/test_app/features/create_appointment_steps.rb +0 -19
- data/tmp/aruba/test_app/features/support/env.rb +0 -18
- data/tmp/aruba/test_app/lib/tasks/cucumber.rake +0 -76
- data/tmp/aruba/test_app/log/development.log +0 -27
- data/tmp/aruba/test_app/log/test.log +0 -38
- data/tmp/aruba/test_app/package.json +0 -5
- data/tmp/aruba/test_app/public/404.html +0 -67
- data/tmp/aruba/test_app/public/422.html +0 -67
- data/tmp/aruba/test_app/public/500.html +0 -66
- data/tmp/aruba/test_app/public/apple-touch-icon-precomposed.png +0 -0
- data/tmp/aruba/test_app/public/apple-touch-icon.png +0 -0
- data/tmp/aruba/test_app/public/favicon.ico +0 -0
- data/tmp/aruba/test_app/public/robots.txt +0 -1
- data/tmp/aruba/test_app/script/cucumber +0 -11
- data/tmp/aruba/test_app/test/application_system_test_case.rb +0 -5
- data/tmp/aruba/test_app/test/controllers/appointments_controller_test.rb +0 -48
- data/tmp/aruba/test_app/test/fixtures/appointments.yml +0 -9
- data/tmp/aruba/test_app/test/models/appointment_test.rb +0 -7
- data/tmp/aruba/test_app/test/system/appointments_test.rb +0 -45
- data/tmp/aruba/test_app/test/test_helper.rb +0 -10
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/0I/0I0oT83oN3NKiEi9XIhexiT3XgkA8mKyCbs25v3l20g.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/0W/0WnFNEwHN4bhDiFTvyMWURx02L4yP3gkP7vtjzKQFVo.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/2B/2Bg65dpvTdePrXa_wG6RsHpQzbqVSiHK0FVa0WdOJ4k.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/2r/2r_85kVmIcWzvJH72GapWtLDhaMP2HEziNxykyYpAUg.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/72/72jdZDzrM3-D_zYkIiPdAWQNeaFsqah154_QvcqWqTQ.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/99/99m8UCKl4j8IpsVOK8ltLHyNh8Ae0nHw3GBkC34V_co.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/9O/9OOXnKHBQnaCeE5HDe5csQsItouzWM6rTl8sESvkGTE.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/AF/AFloQwm_M7GZudPY87xx4TA0xEeuX9Psl0SJ94i5EyU.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/AP/APDAc8aUg_16wNWrVhCJcKeqbxyOScYGVhiDVgbrV7U.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/B4/B43LeT9Wba4fLvXw-C_kKq-x9HwYZxnBBiltbIufzzQ.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/EO/EOut5kyDPr7aKrHdvDsNJuYarA8XGnpAlDvBimlaC08.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/GJ/GJzxuc2i_d4Uhxs4IMnbQXhxBc9CTLrnQyzxwTqKOBw.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Ge/Ge2oyaUStbQszLfXjgTi6LkncyS5SKfV8RJwbRA3HbI.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Hv/HvPd_vK17QbhWq8QnCuyhqm0cPaGnHyO9lSzN-icQdg.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/II/IIhUO-5-DcfCyD_rVJeHjRMNVJxLmAmXP8i2XEjFpns.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Ka/KaLHRsUYc4EUxUr4q_UhArFJUTF_EaBklpeU4TsE9SY.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/MZ/MZcwDENEs93Wd9q7A_7UWdfJrWsBXa0pGp03P9mqG2I.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Nw/NwHea3ImBECnlmojPb9X9ZDfvRRuX_dX9sxISdtp9-A.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/PP/PPKuKT7m2PMDHVzBcYjePvXU6CbCW63Iqe3Q2a-Jdh8.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/RE/REtgGrS74n4Y7OKRcGvZsA2EUClg_RM66mVgGpySI20.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Rk/RkQLRXSz5LhJQnH7BT-ZDkVK0Rx8N9KhcVwR2A1HY4M.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Sx/SxtNEQ-KKVBCTtsDD-xf4oJEIdBPIHkGktnLXvG-GRk.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/TL/TLxLzqEAxKzTHH9EwSg5Lvcp3zgGuhjTjed121DSu9U.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/U1/U1D7nCXYBD3VlPnXGs_6mRtlhs-Gvv_vvCUYlTf4Grw.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/U6/U6pXyI-5haNcHRdsB-SoztzlXb98-256hFReXsL31J4.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/UE/UEKUaC9O_XBO5acP8HnxcJ1dtNM_1C7MTofkTQvPgRA.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/UV/UVcnI5bo-eQvULfmzeQUFVTDYEMF2cbAXpsOsh01XNY.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/WK/WK8RpMP5qb9GRQTsTHAzlfo8t2nsTLU6B8CQAc4UfOU.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Xk/Xk8p9O39-syzKbpnoMRChld0TpoZFWlNIzeT5XKw2fQ.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Zv/ZvCEW2ZyS-k4cHH7Gd8P2nKFE9Uh1VOrfR-1PYY2yz8.cache +0 -5
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/ac/acWu1-1ZAW1jRVKlHYlzlEg28lk-SdHfTq-P-viJMS0.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/b3/b3NiYrQOlN2zxiJYqbl4gmvK6it3Md9gSzAYgsIMhnY.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/c1/c1Pm-rFPEB3LXIjOtswD6x8SEAgI9y2BR16jc8ifcsc.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/em/emTQG2a9zF8NuvElLOnEpNJp0wq3_gVSDAM60vyXAzE.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/fX/fXH3Db_88TmJFhRydoFTx8tZbHAkLzK2ZZ0lsBEg8xA.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/gI/gIHntmCf7DbObPL_KZJYSgduAmqX18ZZPOtq85pn8vo.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/kP/kPwbLAUCLjv0x6fe5lvZpmUkgmvQSDHSdEOSdbMyDgY.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/kT/kT98Z_slHI6SgdEmoAtKAHyJQjTHdbe6GAbB27RP2uI.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/mt/mtT4Rwi7H_vHQXdxxPvvzhL4ziA7X9WK-JXzacxWlEA.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/mz/mzgD6X_N-fO95dP8Q1Q1sApCrbSmgPgsuEKv65KYcdo.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/oi/oiPhXw8pYdWv5T4qRFzePHaXZLI50xMvvTyfry-ILSo.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/r-/r--YB1ugrZ4F-ogbLLYNwIH3j9pQ2u_ZBjTJxoS7TrM.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/s6/s68UIyg0lNko7IA42JXv_wwy9Ea3WH-zc9h0GYPg88Y.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/si/siT97rfEKbIWcCj6KUBChX7kpRBKI2fAeGGwpsz0tTU.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/st/stqDgDfAemfEq7ZxlEj6YThpn8_1Nfw2bRVA0N03YTw.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/t9/t93lpjyly3MvgKs51_OlLXneJXGyYFGmshXsk4Wr69M.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/tE/tEy2QePsDnmFyyAQEric23sSBnfHBst3SEM7p-J7el8.cache +0 -2
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/tR/tRV7SyAY9c71G0o-8bElvNI76KcWhc5NVm48xflMPpM.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/tg/tggwa2O6A41xeZTK4SR0qcX0X55aOGg6q8ZWfqma1vM.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/uB/uBKOYcdzL_6Amevsu-uKAMTg7QGW5kgC0t5sAZINrcI.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/uE/uEyPXY2m04nerJV0pn3p-B-BlkJ08oufpQH1G2QXPw4.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/up/upyndqsU9bU6WV8qyMy7MLpcQoybRqgj-qA3C3pjzXY.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/ux/uxx-W2TOCdnAEGX0ZLThb_QIEbLYutX8qCwD0glYCKE.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/vC/vCsc-q2WmT8vWM2d2pb6_5hFav8mGlylwEKVWQvsumo.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/vc/vcgiILg1wO98x-a4kX678ASAFWA1cL0iVx07VkHLPqA.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/vu/vu6xNIGT6zorPmcKfd7edgxBltTmIRXU281uyK51kkU.cache +0 -1
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/w4/w4y_Lms54hD2Nivh5PHeccAmh2DX53sc_HDTQYNyNXw.cache +0 -3
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/yZ/yZpoD5Zf4RAQoOwi5kMVksuta_0KhYSK_Yy_6Ykyt7E.cache +0 -1
- data/tmp/aruba/test_app/tmp/development_secret.txt +0 -1
data/cucumber-rails.gemspec
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rake/file_list'
|
4
|
-
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = 'cucumber-rails'
|
8
|
-
s.version = '2.2.0'
|
9
|
-
s.authors = ['Aslak Hellesøy', 'Dennis Blöte', 'Rob Holland']
|
10
|
-
s.description = 'Cucumber Generator and Runtime for Rails'
|
11
|
-
s.summary = "#{s.name}-#{s.version}"
|
12
|
-
s.email = 'cukes@googlegroups.com'
|
13
|
-
s.homepage = 'https://cucumber.io'
|
14
|
-
|
15
|
-
s.license = 'MIT'
|
16
|
-
|
17
|
-
s.metadata = {
|
18
|
-
'bug_tracker_uri' => 'https://github.com/cucumber/cucumber-rails/issues',
|
19
|
-
'changelog_uri' => "https://github.com/cucumber/cucumber-rails/blob/v#{s.version}/CHANGELOG.md",
|
20
|
-
'documentation_uri' => 'https://cucumber.io/docs',
|
21
|
-
'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/cukes',
|
22
|
-
'source_code_uri' => "https://github.com/cucumber/cucumber-rails/tree/v#{s.version}"
|
23
|
-
}
|
24
|
-
|
25
|
-
s.add_runtime_dependency('capybara', ['>= 2.18', '< 4']) # We support legacy capybara (But only the last 2.x)
|
26
|
-
s.add_runtime_dependency('cucumber', ['>= 3.0.2', '< 6']) # Support cucumber in the 3.x / 4.x / 5.x revisions
|
27
|
-
s.add_runtime_dependency('mime-types', ['~> 3.2']) # Only support the latest major (3+ years old)
|
28
|
-
s.add_runtime_dependency('nokogiri', '~> 1.8') # Only support the latest major (3+ years old)
|
29
|
-
s.add_runtime_dependency('rails', ['>= 5.0', '< 7']) # We support any version of Rails in the 5.x and 6.x series
|
30
|
-
|
31
|
-
# Main development dependencies
|
32
|
-
s.add_development_dependency('ammeter', '>= 1.1.4')
|
33
|
-
s.add_development_dependency('appraisal', '~> 2.2')
|
34
|
-
s.add_development_dependency('aruba', '~> 1.0')
|
35
|
-
s.add_development_dependency('bundler', '>= 1.17')
|
36
|
-
s.add_development_dependency('rake', '>= 12.0')
|
37
|
-
s.add_development_dependency('rspec', '~> 3.6')
|
38
|
-
s.add_development_dependency('rubocop', '~> 0.89.0')
|
39
|
-
s.add_development_dependency('rubocop-packaging', '~> 0.3.0')
|
40
|
-
s.add_development_dependency('rubocop-performance', '~> 1.7.1')
|
41
|
-
s.add_development_dependency('rubocop-rspec', '~> 1.42.0')
|
42
|
-
s.add_development_dependency('sqlite3', '~> 1.3')
|
43
|
-
|
44
|
-
# For Documentation:
|
45
|
-
s.add_development_dependency('rdoc', '>= 6.0')
|
46
|
-
s.add_development_dependency('yard', '~> 0.9.10')
|
47
|
-
|
48
|
-
s.required_ruby_version = '>= 2.4.0'
|
49
|
-
s.rubygems_version = '>= 1.6.1'
|
50
|
-
s.files = Rake::FileList['**/*'].exclude(*File.read('.gitignore').split)
|
51
|
-
s.test_files = Dir['{spec,features}/**/*']
|
52
|
-
s.require_path = 'lib'
|
53
|
-
end
|
data/dev_tasks/cucumber.rake
DELETED
data/dev_tasks/rspec.rake
DELETED
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= yieldall %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<%= erb(:headers) %>
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
<script type="text/javascript" charset="utf-8">
|
9
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
10
|
-
</script>
|
11
|
-
|
12
|
-
<div id="header">
|
13
|
-
<%= erb(:logo) %>
|
14
|
-
<%= erb(:breadcrumb) %>
|
15
|
-
<%= erb(:search) %>
|
16
|
-
<div class="clear"></div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<iframe id="search_frame"></iframe>
|
20
|
-
|
21
|
-
<div id="content"><%= yieldall %></div>
|
22
|
-
|
23
|
-
<%= erb(:footer) %>
|
24
|
-
</body>
|
25
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
<h3><img src="<%= url_for('images/bubble_32x32.png') %>"></img> Cucumber-Rails <%= CUCUMBER_RAILS_VERSION %></h3>
|
data/dev_tasks/yard.rake
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'yard'
|
4
|
-
require 'yard/rake/yardoc_task'
|
5
|
-
|
6
|
-
SITE_DIR = File.expand_path("#{File.dirname(__FILE__)}/../cucumber.github.com")
|
7
|
-
API_DIR = File.join(SITE_DIR, 'api', 'cucumber-rails', 'ruby', 'yardoc')
|
8
|
-
|
9
|
-
namespace :api do
|
10
|
-
file :dir do
|
11
|
-
raise "You need to git clone git@github.com:cucumber/cucumber.github.com.git #{SITE_DIR}" unless File.directory?(SITE_DIR)
|
12
|
-
|
13
|
-
sh('git pull origin master')
|
14
|
-
mkdir_p API_DIR
|
15
|
-
end
|
16
|
-
|
17
|
-
template_path = File.expand_path(File.join(File.dirname(__FILE__), 'yard'))
|
18
|
-
YARD::Templates::Engine.register_template_path(template_path)
|
19
|
-
YARD::Rake::YardocTask.new(:yard) do |yard|
|
20
|
-
dir = API_DIR
|
21
|
-
mkdir_p dir
|
22
|
-
yard.options = ['--out', dir]
|
23
|
-
end
|
24
|
-
task yard: :dir
|
25
|
-
|
26
|
-
desc "Generate YARD docs for Cucumber-Rails' API"
|
27
|
-
task doc: :yard
|
28
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
Feature: Allow Cucumber to rescue exceptions
|
2
|
-
|
3
|
-
Background: A controller that raises an exception
|
4
|
-
Given I have created a new Rails app and installed cucumber-rails
|
5
|
-
When I write to "app/controllers/posts_controller.rb" with:
|
6
|
-
"""
|
7
|
-
class PostsController < ApplicationController
|
8
|
-
def index
|
9
|
-
raise 'There is an error in index'
|
10
|
-
end
|
11
|
-
end
|
12
|
-
"""
|
13
|
-
And I write to "config/routes.rb" with:
|
14
|
-
"""
|
15
|
-
TestApp::Application.routes.draw do
|
16
|
-
resources :posts
|
17
|
-
end
|
18
|
-
"""
|
19
|
-
|
20
|
-
Scenario: Allow rescue
|
21
|
-
When I write to "features/posts.feature" with:
|
22
|
-
"""
|
23
|
-
Feature: Posts
|
24
|
-
@allow-rescue
|
25
|
-
Scenario: See posts
|
26
|
-
When I look at the posts
|
27
|
-
Then I should see the public error page
|
28
|
-
"""
|
29
|
-
And I write to "features/step_definitions/posts_steps.rb" with:
|
30
|
-
"""
|
31
|
-
When('I look at the posts') do
|
32
|
-
visit '/posts'
|
33
|
-
end
|
34
|
-
|
35
|
-
Then('I should see the public error page') do
|
36
|
-
expect(page).to have_content "We're sorry, but something went wrong."
|
37
|
-
end
|
38
|
-
"""
|
39
|
-
And I run `bundle exec rake db:migrate`
|
40
|
-
And I run `bundle exec cucumber`
|
41
|
-
Then the feature run should pass with:
|
42
|
-
"""
|
43
|
-
1 scenario (1 passed)
|
44
|
-
2 steps (2 passed)
|
45
|
-
"""
|
46
|
-
|
47
|
-
Scenario: Don't allow rescue
|
48
|
-
When I write to "features/posts.feature" with:
|
49
|
-
"""
|
50
|
-
Feature: Posts
|
51
|
-
Scenario: See them
|
52
|
-
When I look at the posts
|
53
|
-
"""
|
54
|
-
And I write to "features/step_definitions/posts_steps.rb" with:
|
55
|
-
"""
|
56
|
-
When('I look at the posts') do
|
57
|
-
visit '/posts'
|
58
|
-
end
|
59
|
-
"""
|
60
|
-
And I run `bundle exec rake db:migrate`
|
61
|
-
And I run `bundle exec cucumber`
|
62
|
-
Then it should fail with:
|
63
|
-
"""
|
64
|
-
1 scenario (1 failed)
|
65
|
-
1 step (1 failed)
|
66
|
-
"""
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Feature: Annotations
|
2
|
-
|
3
|
-
In order to track my development progress
|
4
|
-
As a developer
|
5
|
-
I should be able to list annotations in my features
|
6
|
-
|
7
|
-
Scenario: See annotations in feature file
|
8
|
-
Given I have created a new Rails app with no database and installed cucumber-rails
|
9
|
-
When I write to "features/products.feature" with:
|
10
|
-
"""
|
11
|
-
Feature: Products
|
12
|
-
Scenario: Test a Product
|
13
|
-
# TODO: When I go to the products page
|
14
|
-
"""
|
15
|
-
When I run `bundle exec rake notes`
|
16
|
-
Then it should pass with:
|
17
|
-
"""
|
18
|
-
features/products.feature:
|
19
|
-
* [3] [TODO] When I go to the products page
|
20
|
-
"""
|
@@ -1,132 +0,0 @@
|
|
1
|
-
Feature: Capybara Javascript Drivers
|
2
|
-
|
3
|
-
Scenario: Use a particular driver
|
4
|
-
Given I have created a new Rails app and installed cucumber-rails
|
5
|
-
And I force selenium to run Firefox in headless mode
|
6
|
-
When I run `bundle exec rails g scaffold appointment name:string when:datetime`
|
7
|
-
And I write to "features/create_appointment.feature" with:
|
8
|
-
"""
|
9
|
-
@javascript
|
10
|
-
Feature: Create appointments
|
11
|
-
Scenario: Visit the Constitution on May 17
|
12
|
-
Given I am on the new appointment page
|
13
|
-
And I fill in "Norway's constitution" for "Name"
|
14
|
-
And I select "2015-02-20 15:10:00 UTC" as the "When" date and time
|
15
|
-
And I press "Create Appointment"
|
16
|
-
Then I should see "Norway's constitution"
|
17
|
-
And I should see "2015-02-20 15:10:00 UTC"
|
18
|
-
"""
|
19
|
-
And I write to "features/create_appointment_steps.rb" with:
|
20
|
-
"""
|
21
|
-
Given('I am on the new appointment page') do
|
22
|
-
visit new_appointment_path
|
23
|
-
end
|
24
|
-
|
25
|
-
When('I fill in {string} for {string}') do |value, field|
|
26
|
-
fill_in(field, with: value)
|
27
|
-
end
|
28
|
-
|
29
|
-
When('I press {string}') do |button|
|
30
|
-
click_button(button)
|
31
|
-
end
|
32
|
-
|
33
|
-
Then('I should see {string}') do |text|
|
34
|
-
expect(page).to have_content(text)
|
35
|
-
end
|
36
|
-
|
37
|
-
When('I select {string} as the {string} date and time') do |datetime, selector|
|
38
|
-
select_datetime(datetime, from: selector)
|
39
|
-
end
|
40
|
-
"""
|
41
|
-
And I run `bundle exec rake db:migrate`
|
42
|
-
And I run `bundle exec rake cucumber`
|
43
|
-
Then the feature run should pass with:
|
44
|
-
"""
|
45
|
-
1 scenario (1 passed)
|
46
|
-
6 steps (6 passed)
|
47
|
-
"""
|
48
|
-
|
49
|
-
Scenario: Mixed DB access
|
50
|
-
Given I have created a new Rails app and installed cucumber-rails
|
51
|
-
And I force selenium to run Firefox in headless mode
|
52
|
-
When I run `bundle exec rails g scaffold appointment name:string when:datetime`
|
53
|
-
And I write to "features/create_appointment.feature" with:
|
54
|
-
"""
|
55
|
-
@javascript
|
56
|
-
Feature: Create appointments
|
57
|
-
Scenario: Visit the Constitution on May 17
|
58
|
-
Given a random appointment
|
59
|
-
And I am viewing the appointment
|
60
|
-
Then I should see "Random appointment"
|
61
|
-
"""
|
62
|
-
And I write to "features/step_definitions/create_appointment_steps.rb" with:
|
63
|
-
"""
|
64
|
-
Given('a random appointment') do
|
65
|
-
@appointment = Appointment.create!(name: 'Random appointment', when: DateTime.now)
|
66
|
-
end
|
67
|
-
|
68
|
-
Given('I am viewing the appointment') do
|
69
|
-
visit appointment_path(@appointment)
|
70
|
-
end
|
71
|
-
|
72
|
-
Then('I should see {string}') do |text|
|
73
|
-
expect(page).to have_content(text)
|
74
|
-
end
|
75
|
-
"""
|
76
|
-
And I run `bundle exec rake db:migrate`
|
77
|
-
And I run `bundle exec rake cucumber`
|
78
|
-
Then the feature run should pass with:
|
79
|
-
"""
|
80
|
-
1 scenario (1 passed)
|
81
|
-
3 steps (3 passed)
|
82
|
-
"""
|
83
|
-
|
84
|
-
Scenario: Use a particular driver without a DB
|
85
|
-
Given I have created a new Rails app and installed cucumber-rails without database_cleaner
|
86
|
-
And I force selenium to run Firefox in headless mode
|
87
|
-
When I run `bundle exec rails g scaffold appointment name:string when:datetime`
|
88
|
-
And I write to "features/create_appointment.feature" with:
|
89
|
-
"""
|
90
|
-
@javascript
|
91
|
-
Feature: Create appointments
|
92
|
-
Scenario: Visit the Constitution on May 17
|
93
|
-
Given I am on the new appointment page
|
94
|
-
And I fill in "Norway's constitution" for "Name"
|
95
|
-
And I select "2015-02-20 15:10:00 UTC" as the "When" date and time
|
96
|
-
And I press "Create Appointment"
|
97
|
-
Then I should see "Norway's constitution"
|
98
|
-
And I should see "2015-02-20 15:10:00 UTC"
|
99
|
-
"""
|
100
|
-
And I write to "features/create_appointment_steps.rb" with:
|
101
|
-
"""
|
102
|
-
Given('I am on the new appointment page') do
|
103
|
-
visit new_appointment_path
|
104
|
-
end
|
105
|
-
|
106
|
-
When('I fill in {string} for {string}') do |value, field|
|
107
|
-
fill_in(field, with: value)
|
108
|
-
end
|
109
|
-
|
110
|
-
When('I press {string}') do |button|
|
111
|
-
click_button(button)
|
112
|
-
end
|
113
|
-
|
114
|
-
Then('I should see {string}') do |text|
|
115
|
-
expect(page).to have_content(text)
|
116
|
-
end
|
117
|
-
|
118
|
-
When('I select {string} as the {string} date and time') do |datetime, selector|
|
119
|
-
select_datetime(datetime, from: selector)
|
120
|
-
end
|
121
|
-
"""
|
122
|
-
And I append to "features/support/env.rb" with:
|
123
|
-
"""
|
124
|
-
Cucumber::Rails::Database.autorun_database_cleaner = false
|
125
|
-
"""
|
126
|
-
And I run `bundle exec rake db:migrate`
|
127
|
-
And I run `bundle exec rake cucumber`
|
128
|
-
Then the feature run should pass with:
|
129
|
-
"""
|
130
|
-
1 scenario (1 passed)
|
131
|
-
6 steps (6 passed)
|
132
|
-
"""
|
@@ -1,125 +0,0 @@
|
|
1
|
-
Feature: Choose javascript database strategy
|
2
|
-
|
3
|
-
Whilst running a scenario with the @javascript tag, Capybara will fire up a web server
|
4
|
-
in the same process in a separate thread to your cukes. By default, this means ActiveRecord will give it a
|
5
|
-
separate database connection, which in turn means data you put into your database from
|
6
|
-
Cucumber step definitions (e.g. using FactoryBot) won't be visible to the web server
|
7
|
-
until the database transaction is committed.
|
8
|
-
|
9
|
-
So if you use a transaction strategy for cleaning up your database at the end of a scenario,
|
10
|
-
it won't work for javascript scenarios by default.
|
11
|
-
|
12
|
-
There are two ways around this. One is to switch to a truncation strategy for javascript
|
13
|
-
scenarios. This is slower, but more reliable.
|
14
|
-
|
15
|
-
The alternative is to patch ActiveRecord to share a single database connection between
|
16
|
-
threads. This means you still get the speed benefits of using a transaction to roll back
|
17
|
-
your database, but you run the risk of the two threads stomping on one another as they
|
18
|
-
talk to the database.
|
19
|
-
|
20
|
-
Right now, the default behavior is to use truncation, but you can override this by telling
|
21
|
-
cucumber-rails which strategy to use for javascript scenarios.
|
22
|
-
|
23
|
-
The deletion strategy can be quicker for situations where truncation causes locks which
|
24
|
-
has been reported by some Oracle users.
|
25
|
-
|
26
|
-
Background:
|
27
|
-
Given I have created a new Rails app and installed cucumber-rails
|
28
|
-
And I have a "Widget" ActiveRecord model object
|
29
|
-
When I write to "features/step_definitions/widget_steps.rb" with:
|
30
|
-
"""
|
31
|
-
When('I create {int} widgets') do |number|
|
32
|
-
number.times { Widget.create! }
|
33
|
-
end
|
34
|
-
|
35
|
-
Then('I should have {int} widgets') do |number|
|
36
|
-
expect(Widget.count).to eq(number)
|
37
|
-
end
|
38
|
-
|
39
|
-
Then('the DatabaseCleaner strategy should be {word}') do |strategy_name|
|
40
|
-
expect(DatabaseCleaner.cleaners.values.first.strategy.to_s).to match(/#{strategy_name}/i)
|
41
|
-
end
|
42
|
-
"""
|
43
|
-
|
44
|
-
Scenario: Set the strategy to truncation and run a javascript scenario.
|
45
|
-
When I append to "features/env.rb" with:
|
46
|
-
"""
|
47
|
-
DatabaseCleaner.strategy = :transaction
|
48
|
-
Cucumber::Rails::Database.javascript_strategy = :truncation
|
49
|
-
"""
|
50
|
-
And I write to "features/widgets.feature" with:
|
51
|
-
"""
|
52
|
-
Feature:
|
53
|
-
Background:
|
54
|
-
When I create 2 widgets
|
55
|
-
|
56
|
-
@javascript
|
57
|
-
Scenario:
|
58
|
-
When I create 3 widgets
|
59
|
-
Then the DatabaseCleaner strategy should be truncation
|
60
|
-
And I should have 5 widgets
|
61
|
-
|
62
|
-
@javascript
|
63
|
-
Scenario:
|
64
|
-
Then the DatabaseCleaner strategy should be truncation
|
65
|
-
And I should have 2 widgets
|
66
|
-
|
67
|
-
Scenario:
|
68
|
-
Then the DatabaseCleaner strategy should be transaction
|
69
|
-
And I should have 2 widgets
|
70
|
-
"""
|
71
|
-
And I run the cukes
|
72
|
-
Then the feature run should pass with:
|
73
|
-
"""
|
74
|
-
3 scenarios (3 passed)
|
75
|
-
10 steps (10 passed)
|
76
|
-
"""
|
77
|
-
|
78
|
-
Scenario: Set the strategy to deletion and run a javascript scenario.
|
79
|
-
When I append to "features/env.rb" with:
|
80
|
-
"""
|
81
|
-
Cucumber::Rails::Database.javascript_strategy = :deletion
|
82
|
-
"""
|
83
|
-
And I write to "features/widgets.feature" with:
|
84
|
-
"""
|
85
|
-
@javascript
|
86
|
-
Feature:
|
87
|
-
Background:
|
88
|
-
When I create 2 widgets
|
89
|
-
|
90
|
-
Scenario:
|
91
|
-
When I create 3 widgets
|
92
|
-
Then I should have 5 widgets
|
93
|
-
|
94
|
-
Scenario:
|
95
|
-
Then I should have 2 widgets
|
96
|
-
"""
|
97
|
-
And I run the cukes
|
98
|
-
Then the feature run should pass with:
|
99
|
-
"""
|
100
|
-
2 scenarios (2 passed)
|
101
|
-
5 steps (5 passed)
|
102
|
-
"""
|
103
|
-
|
104
|
-
Scenario: Set the strategy to truncation with an except option and run a javascript scenario.
|
105
|
-
When I append to "features/env.rb" with:
|
106
|
-
"""
|
107
|
-
Cucumber::Rails::Database.javascript_strategy = :truncation, { except: %w[widgets] }
|
108
|
-
"""
|
109
|
-
And I write to "features/widgets.feature" with:
|
110
|
-
"""
|
111
|
-
@javascript
|
112
|
-
Feature:
|
113
|
-
Scenario:
|
114
|
-
When I create 3 widgets
|
115
|
-
Then I should have 3 widgets
|
116
|
-
|
117
|
-
Scenario:
|
118
|
-
Then I should have 3 widgets
|
119
|
-
"""
|
120
|
-
And I run the cukes
|
121
|
-
Then the feature run should pass with:
|
122
|
-
"""
|
123
|
-
2 scenarios (2 passed)
|
124
|
-
3 steps (3 passed)
|
125
|
-
"""
|
@@ -1,48 +0,0 @@
|
|
1
|
-
Feature: Cucumber Rails Configuration
|
2
|
-
|
3
|
-
In order to configure how Cucumber-Rails runs
|
4
|
-
As a developer
|
5
|
-
I should be able to alter the settings of my project
|
6
|
-
|
7
|
-
Scenario: Default configuration
|
8
|
-
Given I have created a new Rails app with no database and installed cucumber-rails
|
9
|
-
When I write to "features/config.feature" with:
|
10
|
-
"""
|
11
|
-
Feature: Rack Test Methods
|
12
|
-
Scenario: Default Methods are added to the World
|
13
|
-
Then Rack Test should be mixed into the Cucumber World
|
14
|
-
"""
|
15
|
-
When I write to "features/step_definitions/config_steps.rb" with:
|
16
|
-
"""
|
17
|
-
Then('Rack Test should be mixed into the Cucumber World') do
|
18
|
-
expect(self.class.ancestors).to include(Rack::Test::Methods)
|
19
|
-
end
|
20
|
-
"""
|
21
|
-
And I run `bundle exec rake cucumber`
|
22
|
-
Then the feature run should pass with:
|
23
|
-
"""
|
24
|
-
1 scenario (1 passed)
|
25
|
-
1 step (1 passed)
|
26
|
-
"""
|
27
|
-
|
28
|
-
Scenario: Altered configuration
|
29
|
-
Given I have created a new Rails app with no database and installed cucumber-rails
|
30
|
-
And I set the environment variable "CR_REMOVE_RACK_TEST_HELPERS" to "true"
|
31
|
-
When I write to "features/config.feature" with:
|
32
|
-
"""
|
33
|
-
Feature: Rack Test Methods
|
34
|
-
Scenario: Rack Test Methods can be removed from the world
|
35
|
-
Then Rack Test should not be mixed into the Cucumber World
|
36
|
-
"""
|
37
|
-
When I write to "features/step_definitions/config_steps.rb" with:
|
38
|
-
"""
|
39
|
-
Then('Rack Test should not be mixed into the Cucumber World') do
|
40
|
-
expect(self.class.ancestors).not_to include(Rack::Test::Methods)
|
41
|
-
end
|
42
|
-
"""
|
43
|
-
And I run `bundle exec rake cucumber`
|
44
|
-
Then the feature run should pass with:
|
45
|
-
"""
|
46
|
-
1 scenario (1 passed)
|
47
|
-
1 step (1 passed)
|
48
|
-
"""
|
@@ -1,131 +0,0 @@
|
|
1
|
-
Feature: Database Cleaner
|
2
|
-
|
3
|
-
Scenario: Create records in background with database_cleaner
|
4
|
-
Given I have created a new Rails app and installed cucumber-rails
|
5
|
-
When I write to "features/widgets.feature" with:
|
6
|
-
"""
|
7
|
-
Feature: Create widgets
|
8
|
-
Background: 2 initial widgets
|
9
|
-
Given I have 2 widgets
|
10
|
-
|
11
|
-
Scenario: Add 3 widgets
|
12
|
-
When I create 3 more widgets
|
13
|
-
Then I should have 5 widgets
|
14
|
-
|
15
|
-
Scenario: Add 7 widgets
|
16
|
-
When I create 7 more widgets
|
17
|
-
Then I should have 9 widgets
|
18
|
-
"""
|
19
|
-
And I run `rails generate model widget name:string`
|
20
|
-
And I write to "features/step_definitions/widget_steps.rb" with:
|
21
|
-
"""
|
22
|
-
Given('I have {int} widgets') do |number|
|
23
|
-
number.times do |i|
|
24
|
-
Widget.create! name: "Widget #{Widget.count + i}"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
When('I create {int} more widgets') do |number|
|
29
|
-
number.times do |i|
|
30
|
-
Widget.create! name: "Widget #{Widget.count + i}"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
Then('I should have {int} widgets') do |number|
|
35
|
-
expect(Widget.count).to eq(number)
|
36
|
-
end
|
37
|
-
"""
|
38
|
-
And I run `bundle exec rake db:migrate`
|
39
|
-
And I run `bundle exec rake cucumber`
|
40
|
-
Then the feature run should pass with:
|
41
|
-
"""
|
42
|
-
2 scenarios (2 passed)
|
43
|
-
6 steps (6 passed)
|
44
|
-
"""
|
45
|
-
|
46
|
-
Scenario: Create records in background with database_cleaner-active_record
|
47
|
-
Given I have created a new Rails app and installed cucumber-rails with database_cleaner-active_record
|
48
|
-
When I write to "features/widgets.feature" with:
|
49
|
-
"""
|
50
|
-
Feature: Create widgets
|
51
|
-
Background: 2 initial widgets
|
52
|
-
Given I have 2 widgets
|
53
|
-
|
54
|
-
Scenario: Add 3 widgets
|
55
|
-
When I create 3 more widgets
|
56
|
-
Then I should have 5 widgets
|
57
|
-
|
58
|
-
Scenario: Add 7 widgets
|
59
|
-
When I create 7 more widgets
|
60
|
-
Then I should have 9 widgets
|
61
|
-
"""
|
62
|
-
And I run `rails generate model widget name:string`
|
63
|
-
And I write to "features/step_definitions/widget_steps.rb" with:
|
64
|
-
"""
|
65
|
-
Given('I have {int} widgets') do |number|
|
66
|
-
number.times do |i|
|
67
|
-
Widget.create! name: "Widget #{Widget.count + i}"
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
When('I create {int} more widgets') do |number|
|
72
|
-
number.times do |i|
|
73
|
-
Widget.create! name: "Widget #{Widget.count + i}"
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
Then('I should have {int} widgets') do |number|
|
78
|
-
expect(Widget.count).to eq(number)
|
79
|
-
end
|
80
|
-
"""
|
81
|
-
And I run `bundle exec rake db:migrate`
|
82
|
-
And I run `bundle exec rake cucumber`
|
83
|
-
Then the feature run should pass with:
|
84
|
-
"""
|
85
|
-
2 scenarios (2 passed)
|
86
|
-
6 steps (6 passed)
|
87
|
-
"""
|
88
|
-
|
89
|
-
Scenario: Create records in background without using database_cleaner
|
90
|
-
Given I have created a new Rails app and installed cucumber-rails without database_cleaner
|
91
|
-
When I write to "features/widgets.feature" with:
|
92
|
-
"""
|
93
|
-
Feature: Create widgets
|
94
|
-
Background: 2 initial widgets
|
95
|
-
# Note this creates 2 widgets each time
|
96
|
-
Given I have 2 widgets
|
97
|
-
|
98
|
-
Scenario: Add 3 widgets
|
99
|
-
When I create 3 more widgets
|
100
|
-
Then I should have 5 widgets
|
101
|
-
|
102
|
-
Scenario: Add 7 widgets
|
103
|
-
When I create 7 more widgets
|
104
|
-
Then I should have 14 widgets
|
105
|
-
"""
|
106
|
-
And I run `rails generate model widget name:string`
|
107
|
-
And I write to "features/step_definitions/widget_steps.rb" with:
|
108
|
-
"""
|
109
|
-
Given('I have {int} widgets') do |number|
|
110
|
-
number.times do |i|
|
111
|
-
Widget.create! name: "Widget #{Widget.count + i}"
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
When('I create {int} more widgets') do |number|
|
116
|
-
number.times do |i|
|
117
|
-
Widget.create! name: "Widget #{Widget.count + i}"
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
Then('I should have {int} widgets') do |number|
|
122
|
-
expect(Widget.count).to eq(number)
|
123
|
-
end
|
124
|
-
"""
|
125
|
-
And I run `bundle exec rake db:migrate`
|
126
|
-
And I run `bundle exec rake cucumber`
|
127
|
-
Then the feature run should pass with:
|
128
|
-
"""
|
129
|
-
2 scenarios (2 passed)
|
130
|
-
6 steps (6 passed)
|
131
|
-
"""
|