Diff of the two buildlogs: -- --- b1/build.log 2025-02-12 14:23:46.541652133 +0000 +++ b2/build.log 2025-02-12 14:24:58.102433303 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Wed Feb 12 02:21:37 -12 2025 -I: pbuilder-time-stamp: 1739370097 +I: Current time: Wed Mar 18 10:46:48 +14 2026 +I: pbuilder-time-stamp: 1773780408 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -28,52 +28,84 @@ dpkg-source: info: applying ignore-mail-warning.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/2827823/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/D01_modify_environment starting +debug: Running on codethink03-arm64. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Mar 17 20:46 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='arm64' - DEBIAN_FRONTEND='noninteractive' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="37" [3]="1" [4]="release" [5]="aarch64-unknown-linux-gnu") + BASH_VERSION='5.2.37(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=arm64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=12 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='arm64' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=aarch64 + HOST_ARCH=arm64 IFS=' ' - INVOCATION_ID='564283778e9641478db7c540b064047a' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='2827823' - PS1='# ' - PS2='> ' + INVOCATION_ID=0eec45a065a84af9926186ac7567f9b6 + LANG=C + LANGUAGE=nl_BE:nl + LC_ALL=C + MACHTYPE=aarch64-unknown-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=2510551 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Zrq8PIg6/pbuilderrc_NN2E --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Zrq8PIg6/b1 --logfile b1/build.log ruby-rspec-rails_6.1.5-2.dsc' - SUDO_GID='109' - SUDO_UID='104' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://192.168.101.4:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Zrq8PIg6/pbuilderrc_tFnq --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Zrq8PIg6/b2 --logfile b2/build.log ruby-rspec-rails_6.1.5-2.dsc' + SUDO_GID=109 + SUDO_UID=104 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://192.168.101.4:3128 I: uname -a - Linux codethink04-arm64 6.1.0-31-cloud-arm64 #1 SMP Debian 6.1.128-1 (2025-02-07) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-31-cloud-arm64 #1 SMP Debian 6.1.128-1 (2025-02-07) aarch64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/2827823/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Nov 22 2024 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -347,7 +379,7 @@ Get: 204 http://deb.debian.org/debian trixie/main arm64 ruby-selenium-webdriver all 4.4.0-1 [119 kB] Get: 205 http://deb.debian.org/debian trixie/main arm64 ruby-sqlite3 arm64 1.6.9-2+b1 [53.9 kB] Get: 206 http://deb.debian.org/debian trixie/main arm64 ruby-warning all 1.3.0-1 [8968 B] -Fetched 60.5 MB in 1s (84.4 MB/s) +Fetched 60.5 MB in 0s (177 MB/s) Preconfiguring packages ... Selecting previously unselected package libpython3.13-minimal:arm64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19920 files and directories currently installed.) @@ -1019,8 +1051,8 @@ Setting up tzdata (2024b-6) ... Current default time zone: 'Etc/UTC' -Local time is now: Wed Feb 12 14:22:31 UTC 2025. -Universal Time is now: Wed Feb 12 14:22:31 UTC 2025. +Local time is now: Tue Mar 17 20:47:17 UTC 2026. +Universal Time is now: Tue Mar 17 20:47:17 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up ruby-websocket-extensions (0.1.5-2) ... @@ -1206,7 +1238,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/ruby-rspec-rails-6.1.5/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-rspec-rails_6.1.5-2_source.changes +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/ruby-rspec-rails-6.1.5/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-rspec-rails_6.1.5-2_source.changes dpkg-buildpackage: info: source package ruby-rspec-rails dpkg-buildpackage: info: source version 6.1.5-2 dpkg-buildpackage: info: source distribution unstable @@ -1239,7 +1275,7 @@ │ ruby-rspec-rails: Installing files and building extensions for ruby3.3 │ └──────────────────────────────────────────────────────────────────────────────┘ -/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20250212-2838757-vt530x/gemspec +/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20260318-2551924-bpw91f/gemspec WARNING: open-ended dependency on actionpack (>= 6.1) is not recommended if actionpack is semantically versioned, use: add_runtime_dependency "actionpack", "~> 6.1" @@ -1254,7 +1290,7 @@ Name: rspec-rails Version: 6.1.5 File: rspec-rails-6.1.5.gem -/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rspec-rails/usr/share/rubygems-integration/all /tmp/d20250212-2838757-vt530x/rspec-rails-6.1.5.gem +/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rspec-rails/usr/share/rubygems-integration/all /tmp/d20260318-2551924-bpw91f/rspec-rails-6.1.5.gem /build/reproducible-path/ruby-rspec-rails-6.1.5/debian/ruby-rspec-rails/usr/share/rubygems-integration/all/gems/rspec-rails-6.1.5/lib/generators/rspec.rb /build/reproducible-path/ruby-rspec-rails-6.1.5/debian/ruby-rspec-rails/usr/share/rubygems-integration/all/gems/rspec-rails-6.1.5/lib/generators/rspec/channel/channel_generator.rb /build/reproducible-path/ruby-rspec-rails-6.1.5/debian/ruby-rspec-rails/usr/share/rubygems-integration/all/gems/rspec-rails-6.1.5/lib/generators/rspec/channel/templates/channel_spec.rb.erb @@ -1379,145 +1415,91 @@ RUBYLIB=. GEM_PATH=/build/reproducible-path/ruby-rspec-rails-6.1.5/debian/ruby-rspec-rails/usr/share/rubygems-integration/all:/build/reproducible-path/ruby-rspec-rails-6.1.5/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.3.0:/var/lib/gems/3.3.0:/usr/local/lib/ruby/gems/3.3.0:/usr/lib/ruby/gems/3.3.0:/usr/lib/aarch64-linux-gnu/ruby/gems/3.3.0:/usr/share/rubygems-integration/3.3.0:/usr/share/rubygems-integration/all:/usr/lib/aarch64-linux-gnu/rubygems-integration/3.3.0 ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake /usr/bin/ruby3.3 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec ./spec/rspec/rails/active_model_spec.rb ./spec/rspec/rails/active_record_spec.rb ./spec/rspec/rails/assertion_adapter_spec.rb ./spec/rspec/rails/assertion_delegator_spec.rb ./spec/rspec/rails/configuration_spec.rb ./spec/rspec/rails/example/channel_example_group_spec.rb ./spec/rspec/rails/example/controller_example_group_spec.rb ./spec/rspec/rails/example/feature_example_group_spec.rb ./spec/rspec/rails/example/helper_example_group_spec.rb ./spec/rspec/rails/example/job_example_group_spec.rb ./spec/rspec/rails/example/mailbox_example_group_spec.rb ./spec/rspec/rails/example/model_example_group_spec.rb ./spec/rspec/rails/example/rails_example_group_spec.rb ./spec/rspec/rails/example/request_example_group_spec.rb ./spec/rspec/rails/example/routing_example_group_spec.rb ./spec/rspec/rails/example/system_example_group_spec.rb ./spec/rspec/rails/example/view_example_group_spec.rb ./spec/rspec/rails/fixture_file_upload_support_spec.rb ./spec/rspec/rails/fixture_support_spec.rb ./spec/rspec/rails/matchers/action_cable/have_broadcasted_to_spec.rb ./spec/rspec/rails/matchers/action_cable/have_stream_spec.rb ./spec/rspec/rails/matchers/action_mailbox_spec.rb ./spec/rspec/rails/matchers/active_job_spec.rb ./spec/rspec/rails/matchers/be_a_new_spec.rb ./spec/rspec/rails/matchers/be_new_record_spec.rb ./spec/rspec/rails/matchers/be_routable_spec.rb ./spec/rspec/rails/matchers/be_valid_spec.rb ./spec/rspec/rails/matchers/has_spec.rb ./spec/rspec/rails/matchers/have_enqueued_mail_spec.rb ./spec/rspec/rails/matchers/have_http_status_spec.rb ./spec/rspec/rails/matchers/have_rendered_spec.rb ./spec/rspec/rails/matchers/redirect_to_spec.rb ./spec/rspec/rails/matchers/relation_match_array_spec.rb ./spec/rspec/rails/matchers/route_to_spec.rb ./spec/rspec/rails/matchers/send_email_spec.rb ./spec/rspec/rails/minitest_lifecycle_adapter_spec.rb ./spec/rspec/rails/setup_and_teardown_adapter_spec.rb ./spec/rspec/rails/view_rendering_spec.rb ./spec/rspec/rails/view_spec_methods_spec.rb ./spec/rspec/rails_spec.rb --format documentation -Randomized with seed 12451 +Randomized with seed 15307 -RSpec::Rails::HelperExampleGroup - provides a controller_path based on the helper module's name - #helper - includes ApplicationHelper - returns the instance of AV::Base provided by AV::TC::Behavior +RSpec::Rails::JobExampleGroup behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :helper` - for an example group defined in a file in the .\spec\helpers\ directory - does not tag groups in that directory with `type: :helper` - does not include itself in the example group - for an example group defined in a file in the ./spec/helpers/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :helper` when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :helper` - for an example group defined in a file in the .\spec\helpers\ directory - includes itself in the example group - tags groups in that directory with `type: :helper` + includes itself in example groups tagged with `type: :job` + for an example group defined in a file in the .\spec\jobs\ directory + applies configured `before(:context)` hooks with `type: :job` metadata + tags groups in that directory with `type: :job` allows users to override the type - applies configured `before(:context)` hooks with `type: :helper` metadata - for an example group defined in a file in the ./spec/helpers/ directory - tags groups in that directory with `type: :helper` includes itself in the example group - applies configured `before(:context)` hooks with `type: :helper` metadata + for an example group defined in a file in the ./spec/jobs/ directory allows users to override the type + tags groups in that directory with `type: :job` + applies configured `before(:context)` hooks with `type: :job` metadata + includes itself in the example group + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :job` + for an example group defined in a file in the .\spec\jobs\ directory + does not tag groups in that directory with `type: :job` + does not include itself in the example group + for an example group defined in a file in the ./spec/jobs/ directory + does not tag groups in that directory with `type: :job` + does not include itself in the example group -ActiveRecord support - with partial double verification enabled - allows you to stub abstract classes - allows you to stub `ActiveRecord::Base` - with partial double verification disabled - allows you to stub `ActiveRecord::Base` - allows you to stub abstract classes - -RSpec::Rails::FixtureSupport - handles namespaced fixtures - with use_transactional_fixtures set to false - still supports fixture_path/fixture_paths - with use_transactional_tests set to false - does not wrap the test in a transaction - with use_transactional_tests set to true - works with #uses_transaction helper +send_email + fails with a clear message when no emails were sent + checks email sending by no params + with to_not + fails for multiple matches + checks email sending by all params together + fails with a clear message + fails with a clear message for negated version + with a custom negated version defined + fails with a clear message + works with a negated version + with a compound negated version + works when both matchings pass + works when first matching fails + works when second matching fails + with compound matching + works when second matching fails + works when first matching fails + works when both matchings pass -ActiveJob matchers - Active Job test helpers - does not raise that "assert_nothing_raised" is undefined - have_been_enqueued - passes with default jobs count (exactly one) - accepts composable matchers as an at date - passes when negated - fails when negated and several jobs enqueued - fails when job is not enqueued - counts all enqueued jobs - have_enqueued_job - throws descriptive error when no test adapter set - works with time offsets - generates failure message with at least hint - passes with multiple jobs - passes with :once count - fails when negated and several jobs enqueued - fails when too many jobs enqueued - has an enqueued job when not providing at and there is a wait - reports correct number in fail error message - raises ArgumentError when no Proc passed to expect - passes with job name - passes with provided arguments - passes with provided at time - generates failure message with all provided options - fails when job is not enqueued - passes with provided queue name as string - passes with provided at date - fails when negated and job is enqueued - passes with at_most count when enqueued jobs are under limit - ignores undeserializable arguments - passes multiple arguments to with block - warns when time offsets are inprecise - generates failure message with at most hint - has an enqueued job when providing at and there is no wait - has an enqueued job when providing at of :no_wait and there is no wait - passes with Time - passes deserialized arguments to with block - accepts composable matchers as an at date - passes with provided queue name as symbol - only calls with block if other conditions are met - passes when using alias - fails with with block with incorrect data - passes with at_least count when enqueued jobs are over limit - passes with ActiveSupport::TimeWithZone - counts only jobs enqueued in block - passes when negated - passes with default jobs count (exactly one) - passes with :thrice count - passes with :twice count - passes with provided arguments containing global id object - does not have an enqueued job when providing at of :no_wait and there is a wait - passes with provided argument matchers - when previously enqueued jobs were performed - counts newly enqueued jobs - when job is retried - passes with reenqueued job - have_performed_job - throws descriptive error when no test adapter set - fails with with block with incorrect data - fails when negated and job is performed - passes with provided arguments containing global id object - passes with default jobs count (exactly one) - passes with multiple jobs - passes with provided queue name as symbol - only calls with block if other conditions are met - passes with :once count - fails when too many jobs performed - passes with at_most count when performed jobs are under limit - passes with :thrice count - passes when negated - counts only jobs performed in block - passes with provided argument matchers - passes with at_least count when performed jobs are over limit - passes with provided at date - reports correct number in fail error message - passes with provided arguments - generates failure message with at most hint - passes with provided queue name as string - passes with :twice count - passes deserialized arguments to with block - generates failure message with at least hint - passes with job name - fails when job is not performed - generates failure message with all provided options - passes multiple arguments to with block - raises ArgumentError when no Proc passed to expect - have_been_performed - counts all performed jobs - fails when job is not performed - passes with default jobs count (exactly one) - passes when negated +be_a_new matcher + #with + wrong class and existing record + one attribute value not the same + fails + no attributes same + fails + all attributes same + fails + right class and new record + with composable matchers + one attribute is a composable matcher + passes + fails + matcher is wrong type + fails + two attributes are composable matchers + only one matcher present in actual + fails + both matchers present in actual + passes + no attributes same + fails + one attribute same + passes + one attribute value not the same + fails + all attributes same + passes + existing record + wrong class + fails + right class + fails + new record + right class + passes + wrong class + fails RSpec::Rails::FeatureExampleGroup includes Rails route helpers @@ -1527,671 +1509,835 @@ adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is configured includes itself in example groups tagged with `type: :feature` - for an example group defined in a file in the .\spec\features\ directory - tags groups in that directory with `type: :feature` + for an example group defined in a file in the ./spec/features/ directory + allows users to override the type includes itself in the example group applies configured `before(:context)` hooks with `type: :feature` metadata - allows users to override the type - for an example group defined in a file in the ./spec/features/ directory tags groups in that directory with `type: :feature` - allows users to override the type + for an example group defined in a file in the .\spec\features\ directory applies configured `before(:context)` hooks with `type: :feature` metadata + allows users to override the type + tags groups in that directory with `type: :feature` includes itself in the example group when `infer_spec_type_from_file_location!` is not configured includes itself in example groups tagged with `type: :feature` - for an example group defined in a file in the ./spec/features/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :feature` for an example group defined in a file in the .\spec\features\ directory does not tag groups in that directory with `type: :feature` does not include itself in the example group + for an example group defined in a file in the ./spec/features/ directory + does not tag groups in that directory with `type: :feature` + does not include itself in the example group #visit is resistant to load order errors raises an error informing about missing Capybara -route_to - delegates to assert_recognizes - uses failure message from assert_recognizes - provides a description - with shortcut syntax - routes with nested query parameters - routes without extra options - routes with extra options - routes with one query parameter - routes with multiple query parameters - with should - when assert_recognizes fails with an assertion failure - fails with message from assert_recognizes - when assert_recognizes fails with a routing error - fails with message from assert_recognizes - when assert_recognizes passes - passes - when an exception is raised - raises that exception - with should_not - when assert_recognizes fails with a routing error - passes - when an exception is raised - raises that exception - when assert_recognizes fails with an assertion failure - passes - when assert_recognizes passes - fails with custom message +HaveEnqueuedMail matchers + have_enqueued_mail + counts only emails enqueued in the block + generates a failure message with arguments + passes for mailer methods with default arguments + passes when negated with 0 arguments + passes for mailer methods that accept arguments when the provided argument matcher is not used + passes when deliver_later is called with a wait_until argument + generates a failure message with at + generates a failure message with unmatching enqueued mail jobs + passes when negated with only mailer arguments + passes when negated + fails when too many emails are enqueued + generates a failure message with on_queue + passes when using the have_enqueued_email alias + throws descriptive error when no test adapter set + passes when using the enqueue_email alias + fails with with block with incorrect data + passes multiple arguments to with block + fails when negated and mail is enqueued + passes when using the enqueue_mail alias + only calls with block if other conditions are met + passes when deliver_later is called with a queue argument + generates a failure message with at most hint + ensure that the right mailer is enqueued + passes with at_most when enqueued emails are under the limit + passes when only given mailer argument + generates a failure message when given only mailer argument + generates a failure message + passes with :twice count + generates a failure message with at least hint + passes with :once count + accepts composable matchers as an at date + passes with :thrice count + generates a failure message when given 0 argument + passes with provided argument matchers + passes with multiple emails + matches based on mailer class and method name + passes when a mailer method is called with deliver_later + passes with at_least when enqueued emails are over the limit + passes when given 0 arguments + when parameterized + passes with provided argument matchers + passes when mailer is parameterized + passes when mixing parameterized and non-parameterized emails + mailer job is unified + passes when given a global id serialized argument + passes when mailer is parameterized + passes when using a mailer with `delivery_job` set to a sub class of `ActionMailer::DeliveryJob` + passes with provided argument matchers + passes when mixing parameterized and non-parameterized emails + matches arguments when mailer has only args + +RSpec::Rails::ModelExampleGroup + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :model` + for an example group defined in a file in the .\spec\models\ directory + applies configured `before(:context)` hooks with `type: :model` metadata + includes itself in the example group + tags groups in that directory with `type: :model` + allows users to override the type + for an example group defined in a file in the ./spec/models/ directory + tags groups in that directory with `type: :model` + applies configured `before(:context)` hooks with `type: :model` metadata + includes itself in the example group + allows users to override the type + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :model` + for an example group defined in a file in the ./spec/models/ directory + does not tag groups in that directory with `type: :model` + does not include itself in the example group + for an example group defined in a file in the .\spec\models\ directory + does not tag groups in that directory with `type: :model` + does not include itself in the example group ActiveModel support - with partial double verification disabled - allows you to stub `ActiveModel` - allows you to stub instances of `ActiveModel` with partial double verification enabled allows you to stub `ActiveModel` allows you to stub instances of `ActiveModel` + with partial double verification disabled + allows you to stub instances of `ActiveModel` + allows you to stub `ActiveModel` + +RSpec::Rails::HelperExampleGroup::ClassMethods + determine_default_helper_class + the described is a class + returns nil + the described is a module + returns the module ActionMailbox matchers receive_inbound_email - fails when negated when it receives inbound email passes when negated when it doesn't receive inbound email - fails when it doesn't receive inbound email passes when it receives inbound email + fails when negated when it receives inbound email + fails when it doesn't receive inbound email + +RSpec::Rails::ControllerExampleGroup + includes routing matchers + handles methods invoked via `method_missing` that use keywords + controller name + sets name as AnonymousController if defined as ApplicationController + sets name as AnonymousController if it inherits outer group's anonymous controller + sets the name according to defined controller if it is not anonymous + sets name as AnonymousController if the controller is abstract + sets the name as AnonymousController if it's anonymous + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :controller` + for an example group defined in a file in the .\spec\controllers\ directory + includes itself in the example group + tags groups in that directory with `type: :controller` + applies configured `before(:context)` hooks with `type: :controller` metadata + allows users to override the type + for an example group defined in a file in the ./spec/controllers/ directory + includes itself in the example group + allows users to override the type + tags groups in that directory with `type: :controller` + applies configured `before(:context)` hooks with `type: :controller` metadata + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :controller` + for an example group defined in a file in the .\spec\controllers\ directory + does not include itself in the example group + does not tag groups in that directory with `type: :controller` + for an example group defined in a file in the ./spec/controllers/ directory + does not tag groups in that directory with `type: :controller` + does not include itself in the example group + #controller + delegates named route helpers to the underlying controller + calls NamedRouteCollection#route_defined? when it checks that given route is defined or not + with implicit subject + uses the controller as the subject + doesn't cause let definition priority to be changed + with inferred anonymous controller + defaults to inferring anonymous controller class + when infer_base_class_for_anonymous_controllers is false + sets the anonymous controller class to ApplicationController + sets the anonymous controller class to ActiveController::Base when no ApplicationController is present + when infer_base_class_for_anonymous_controllers is true + infers the anonymous controller class + infers the anonymous controller class when no ApplicationController is present + #bypass_rescue + overrides the rescue_with_handler method on the controller to raise submitted error + with explicit subject + uses the specified subject instead of the controller + in a namespace + controller name + sets the name as 'AnonymousController' if the controller is abstract + sets the name according to the defined controller namespace if it is not anonymous RSpec::Rails::MinitestAssertionAdapter - exposes assert_instance_of to host examples - exposes refute_nil to host examples - exposes refute_includes to host examples - exposes refute_respond_to to host examples - exposes assert_equal to host examples - does not expose internal methods of Minitest - exposes refute_same to host examples - exposes refute_pattern to host examples exposes refute_instance_of to host examples + exposes refute_pattern to host examples + exposes refute_match to host examples + exposes assert_kind_of to host examples + exposes assert_includes to host examples + exposes assert to host examples + exposes refute_includes to host examples + exposes assert_pattern to host examples exposes refute_empty to host examples + exposes refute_operator to host examples exposes assert_operator to host examples - exposes assert_pattern to host examples - exposes assert_includes to host examples - exposes assert_kind_of to host examples + exposes assert_match to host examples + exposes assert_same to host examples + exposes assert_instance_of to host examples exposes refute to host examples - exposes assert_silent to host examples - exposes assert_path_exists to host examples - exposes assert_send to host examples - exposes assert_empty to host examples exposes assert_predicate to host examples - exposes assert_respond_to to host examples - exposes flunk to host examples - does not expose Minitest's message method - exposes assert_match to host examples - exposes assert_throws to host examples - exposes refute_match to host examples + exposes assert_path_exists to host examples + exposes refute_in_epsilon to host examples + exposes assert_raises to host examples exposes refute_predicate to host examples + does not leak TestUnit specific methods into the AssertionDelegator + exposes assert_respond_to to host examples + exposes assert_equal to host examples + exposes refute_equal to host examples exposes refute_kind_of to host examples - exposes assert_raises to host examples exposes assert_output to host examples - exposes assert_nil to host examples exposes refute_path_exists to host examples exposes refute_in_delta to host examples exposes assert_in_delta to host examples + exposes refute_same to host examples + exposes assert_silent to host examples + exposes assert_send to host examples + exposes assert_throws to host examples + does not expose internal methods of Minitest exposes assert_in_epsilon to host examples - exposes assert_same to host examples - exposes refute_equal to host examples - does not leak TestUnit specific methods into the AssertionDelegator - exposes refute_in_epsilon to host examples - exposes refute_operator to host examples - exposes assert to host examples + exposes assert_empty to host examples + exposes refute_nil to host examples + does not expose Minitest's message method + exposes assert_nil to host examples + exposes refute_respond_to to host examples + exposes flunk to host examples -RSpec::Rails::ChannelExampleGroup +RSpec::Rails::RequestExampleGroup behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :request` + for an example group defined in a file in the ./spec/api/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :request` + for an example group defined in a file in the ./spec/requests/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :request` + for an example group defined in a file in the .\spec\api\ directory + does not tag groups in that directory with `type: :request` + does not include itself in the example group + for an example group defined in a file in the .\spec\requests\ directory + does not tag groups in that directory with `type: :request` + does not include itself in the example group + for an example group defined in a file in the ./spec/integration/ directory + does not tag groups in that directory with `type: :request` + does not include itself in the example group + for an example group defined in a file in the .\spec\integration\ directory + does not tag groups in that directory with `type: :request` + does not include itself in the example group when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :channel` - for an example group defined in a file in the .\spec\channels\ directory + includes itself in example groups tagged with `type: :request` + for an example group defined in a file in the .\spec\api\ directory + allows users to override the type + tags groups in that directory with `type: :request` + includes itself in the example group + applies configured `before(:context)` hooks with `type: :request` metadata + for an example group defined in a file in the .\spec\integration\ directory + applies configured `before(:context)` hooks with `type: :request` metadata includes itself in the example group allows users to override the type - applies configured `before(:context)` hooks with `type: :channel` metadata - tags groups in that directory with `type: :channel` - for an example group defined in a file in the ./spec/channels/ directory - applies configured `before(:context)` hooks with `type: :channel` metadata - tags groups in that directory with `type: :channel` + tags groups in that directory with `type: :request` + for an example group defined in a file in the ./spec/requests/ directory + allows users to override the type + applies configured `before(:context)` hooks with `type: :request` metadata + includes itself in the example group + tags groups in that directory with `type: :request` + for an example group defined in a file in the ./spec/api/ directory + allows users to override the type + includes itself in the example group + tags groups in that directory with `type: :request` + applies configured `before(:context)` hooks with `type: :request` metadata + for an example group defined in a file in the .\spec\requests\ directory + tags groups in that directory with `type: :request` + allows users to override the type + applies configured `before(:context)` hooks with `type: :request` metadata + includes itself in the example group + for an example group defined in a file in the ./spec/integration/ directory + applies configured `before(:context)` hooks with `type: :request` metadata + tags groups in that directory with `type: :request` allows users to override the type includes itself in the example group - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :channel` - for an example group defined in a file in the ./spec/channels/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :channel` - for an example group defined in a file in the .\spec\channels\ directory - does not include itself in the example group - does not tag groups in that directory with `type: :channel` -should have_xxx - works with ActiveRecord::Associations::CollectionProxy +RSpec::Rails::MinitestLifecycleAdapter + invokes minitest lifecycle hooks at the appropriate times + allows let variables named 'send' + +RSpec::Rails::FixtureFileUploadSupport + with fixture path set in config + resolves fixture file + resolves supports `Pathname` objects + with fixture path set in spec + resolves fixture file + with fixture path not set + resolves fixture using relative path + +RSpec::Rails::AssertionDelegator + delegates back to the including instance for methods the assertion module requires + provides a module that delegates assertion methods to an isolated class + does not delegate method_missing have_stream matchers - have_streams - does not allow usage + have_stream_from raises when no subscription started - with negated form - fails with message - passes with negated form - raises when no subscription started - raises ArgumentError when no subscription passed to expect - have_stream_for raises ArgumentError when no subscription passed to expect - raises when no subscription started - fails with message passes - with negated form + fails with message + with composable matcher + fails with message passes + with negated form fails with message - have_stream_from - raises when no subscription started - passes + passes + have_stream_for raises ArgumentError when no subscription passed to expect + passes fails with message + raises when no subscription started with negated form fails with message passes - with composable matcher - passes + have_streams + does not allow usage + raises when no subscription started + with negated form + passes with negated form + raises ArgumentError when no subscription passed to expect fails with message + raises when no subscription started -RSpec::Rails::AssertionDelegator - does not delegate method_missing - provides a module that delegates assertion methods to an isolated class - delegates back to the including instance for methods the assertion module requires - -HaveEnqueuedMail matchers - have_enqueued_mail - passes when negated with only mailer arguments - passes when a mailer method is called with deliver_later - generates a failure message with at most hint - generates a failure message with at least hint - fails when negated and mail is enqueued - passes for mailer methods that accept arguments when the provided argument matcher is not used - passes with at_most when enqueued emails are under the limit - generates a failure message with on_queue - passes for mailer methods with default arguments - passes when given 0 arguments - generates a failure message with arguments - matches based on mailer class and method name - generates a failure message with at - fails with with block with incorrect data - generates a failure message when given 0 argument - ensure that the right mailer is enqueued - passes when deliver_later is called with a queue argument - passes multiple arguments to with block - only calls with block if other conditions are met - passes with :once count - passes when negated with 0 arguments - passes with :twice count - fails when too many emails are enqueued - generates a failure message - accepts composable matchers as an at date - passes with multiple emails - passes when using the enqueue_mail alias - counts only emails enqueued in the block - passes with :thrice count - generates a failure message when given only mailer argument - passes when only given mailer argument - passes when deliver_later is called with a wait_until argument - throws descriptive error when no test adapter set - generates a failure message with unmatching enqueued mail jobs - passes with at_least when enqueued emails are over the limit - passes with provided argument matchers - passes when using the enqueue_email alias - passes when negated - passes when using the have_enqueued_email alias - when parameterized - passes with provided argument matchers - passes when mixing parameterized and non-parameterized emails - passes when mailer is parameterized - mailer job is unified - passes when using a mailer with `delivery_job` set to a sub class of `ActionMailer::DeliveryJob` - passes when given a global id serialized argument - passes with provided argument matchers - passes when mailer is parameterized - matches arguments when mailer has only args - passes when mixing parameterized and non-parameterized emails - -be_routable - provides a description - with should_not - fails if routes recognize the path - passes if routes do not recognize the path - with should - passes if routes recognize the path - fails if routes do not recognize the path - -render_template - given a hash - delegates to assert_template - with should - when assert_template passes - passes - when assert_template fails - uses failure message from assert_template - when fails due to some other exception - raises that exception - given a symbol - converts to_s and delegates to assert_template - given a string - delegates to assert_template - with should_not - when fails with a redirect - gives informative error message - with a badly formatted error message - falls back to something informative - when fails due to some other exception - raises that exception - when assert_template fails - passes - when assert_template passes - fails with custom failure message +RSpec::Rails::SetupAndTeardownAdapter + .setup + registers before hooks in the order setup is received + registers teardown hooks in the order setup is received + registers prepend_before hooks for the Rails' setup methods -RSpec::Rails::ModelExampleGroup +RSpec::Rails::ChannelExampleGroup behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :model` - for an example group defined in a file in the .\spec\models\ directory + includes itself in example groups tagged with `type: :channel` + for an example group defined in a file in the ./spec/channels/ directory + does not tag groups in that directory with `type: :channel` does not include itself in the example group - does not tag groups in that directory with `type: :model` - for an example group defined in a file in the ./spec/models/ directory - does not tag groups in that directory with `type: :model` + for an example group defined in a file in the .\spec\channels\ directory + does not tag groups in that directory with `type: :channel` does not include itself in the example group when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :model` - for an example group defined in a file in the ./spec/models/ directory - applies configured `before(:context)` hooks with `type: :model` metadata - allows users to override the type - tags groups in that directory with `type: :model` - includes itself in the example group - for an example group defined in a file in the .\spec\models\ directory - applies configured `before(:context)` hooks with `type: :model` metadata + includes itself in example groups tagged with `type: :channel` + for an example group defined in a file in the .\spec\channels\ directory includes itself in the example group + applies configured `before(:context)` hooks with `type: :channel` metadata allows users to override the type - tags groups in that directory with `type: :model` - -RSpec::Rails::JobExampleGroup - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :job` - for an example group defined in a file in the .\spec\jobs\ directory - does not include itself in the example group - does not tag groups in that directory with `type: :job` - for an example group defined in a file in the ./spec/jobs/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :job` - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :job` - for an example group defined in a file in the ./spec/jobs/ directory - allows users to override the type - tags groups in that directory with `type: :job` - applies configured `before(:context)` hooks with `type: :job` metadata + tags groups in that directory with `type: :channel` + for an example group defined in a file in the ./spec/channels/ directory + applies configured `before(:context)` hooks with `type: :channel` metadata + tags groups in that directory with `type: :channel` includes itself in the example group - for an example group defined in a file in the .\spec\jobs\ directory allows users to override the type - applies configured `before(:context)` hooks with `type: :job` metadata - tags groups in that directory with `type: :job` - includes itself in the example group - -Configuration - metadata `type: :routing` sets up routing example groups - adds 'lib/rspec/rails' to the backtrace exclusions - metadata `type: :controller` sets up controller example groups - fixture support is included with metadata `:use_fixtures` - metadata `type: :feature` sets up feature example groups - metadata `type: :view` sets up view example groups - metadata `type: :mailer` sets up mailer example groups - has a default #file_fixture_path of 'spec/fixtures/files' - metadata `type: :model` sets up model example groups - adds 'vendor/' to the backtrace exclusions - metadata `type: :request` sets up request example groups - metadata `type: :helper` sets up helper example groups - #filter_rails_from_backtrace! adds exclusion patterns for rails gems - #infer_spec_type_from_file_location! - sets the type to `:feature` for file path `spec/features` - sets the type to `:routing` for file path `spec/routing` - sets the type to `:mailer` for file path `spec/mailers` - sets the type to `:model` for file path `spec/models` - sets the type to `:request` for file path `spec/integration` - sets the type to `:helper` for file path `spec/helpers` - sets the type to `:controller` for file path `spec/controllers` - sets the type to `:view` for file path `spec/views` - sets the type to `:request` for file path `spec/requests` - sets the type to `:request` for file path `spec/api` - adds settings - `#fixture_path?` is `false` by default - `#infer_base_class_for_anonymous_controllers` is `true` by default - `#fixture_path` is `nil` by default - `#global_fixtures?` is `false` by default - `#rendering_views?` is `false` by default - `#fixture_path?` is `false` by default - `#infer_base_class_for_anonymous_controllers?` is `true` by default - `#use_transactional_examples` is an alias for `use_transactional_fixtures` - `#use_instantiated_fixtures` is `nil` by default - `#render_views?` is false by default - `#use_transactional_fixtures` is `nil` by default - `#rendering_views` is `nil` by default - `#global_fixtures` is `nil` by default - `#render_views` sets `render_views?` to `true` - `#use_transactional_fixtures?` is `false` by default - `#use_instantiated_fixtures?` is `false` by default - `#use_instantiated_fixtures?` is `false` by default - `#global_fixtures?` is `false` by default - `#rendering_views?` is `false` by default - `#infer_base_class_for_anonymous_controllers?` is `true` by default - `#use_transactional_fixtures?` is `false` by default - `#rendering_views=` - changes `rendering_views?` to the true for a truthy value - sets `rendering_views` to the provided value - `#fixture_path=` - sets `fixture_path` to the provided value - changes `fixture_path?` to the true for a truthy value - `#use_transactional_fixtures=` - sets `use_transactional_fixtures` to the provided value - changes `use_transactional_fixtures?` to the true for a truthy value - `#use_instantiated_fixtures=` - sets `use_instantiated_fixtures` to the provided value - changes `use_instantiated_fixtures?` to the true for a truthy value - `#global_fixtures=` - changes `global_fixtures?` to the true for a truthy value - sets `global_fixtures` to the provided value - `#render_views=` - sets `render_views?` to the truthiness of the provided value - `#infer_base_class_for_anonymous_controllers=` - sets `infer_base_class_for_anonymous_controllers` to the provided value - changes `infer_base_class_for_anonymous_controllers?` to the true for a truthy value - clears ActionMailer::Base::Deliveries after each example - only has deliveries from this test (e.g. from email@example.com) (PENDING: Temporarily skipped with xit) - only has deliveries from this test (e.g. from email_2@example.com) (PENDING: Temporarily skipped with xit) - -ActiveSupport::Relation match_array matcher - fails if the scope encompasses more records than on the right hand side - verifies that the scope returns the records on the right hand side, regardless of order - fails if the scope encompasses fewer records than on the right hand side have_http_status + http status :success + behaves like does not use deprecated methods for Rails 5.2+ + does not use deprecated method for Rails >= 5.2 + with deprecated rack status codes + supports the original names + with a symbolic status + raises an ArgumentError + has a failure message reporting the expected and actual statuses + has a negated failure message reporting the expected status code + describes responding by the symbolic and associated numeric status code + behaves like supports different response instances + has a failure message reporting it was given another type + has a negated failure message reporting it was given another type + returns false given another type + given a Rack::MockResponse + returns true for a response with the same code + given an ActionDispatch::TestResponse + returns true for a response with the same code + given something that acts as a Capybara::Session + returns true for a response with the same code + given an ActionDispatch::Response + returns true for a response with the same code + matching a response + returns false for a response with a different code + returns true for a response with the equivalent code + http status :error + behaves like does not use deprecated methods for Rails 5.2+ + does not use deprecated method for Rails >= 5.2 + http status :not_found + behaves like supports different response instances + has a failure message reporting it was given another type + has a negated failure message reporting it was given another type + returns false given another type + given an ActionDispatch::Response + returns true for a response with the same code + given something that acts as a Capybara::Session + returns true for a response with the same code + given an ActionDispatch::TestResponse + returns true for a response with the same code + given a Rack::MockResponse + returns true for a response with the same code + with a nil status + raises an ArgumentError with general status code group :redirect behaves like status code matcher has a failure message reporting the expected and actual status codes - describes behaves like status code matcher has a negated failure message reporting the expected and actual status codes + describes behaves like status code matcher matching a response - returns true for a response with code returns false for a response with a different code + returns true for a response with code behaves like supports different response instances - returns false given another type has a failure message reporting it was given another type + returns false given another type has a negated failure message reporting it was given another type given an ActionDispatch::Response returns true for a response with the same code - given something that acts as a Capybara::Session + given an ActionDispatch::TestResponse returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code - given an ActionDispatch::TestResponse + given something that acts as a Capybara::Session returns true for a response with the same code - with general status code group :error + with general status code group :server_error behaves like supports different response instances - has a failure message reporting it was given another type returns false given another type has a negated failure message reporting it was given another type - given a Rack::MockResponse + has a failure message reporting it was given another type + given something that acts as a Capybara::Session returns true for a response with the same code - given an ActionDispatch::TestResponse + given a Rack::MockResponse returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given something that acts as a Capybara::Session + given an ActionDispatch::TestResponse returns true for a response with the same code behaves like status code matcher + describes behaves like status code matcher has a negated failure message reporting the expected and actual status codes has a failure message reporting the expected and actual status codes - describes behaves like status code matcher matching a response returns true for a response with code returns false for a response with a different code - with general status code group :successful + with general status code group :error behaves like status code matcher + has a negated failure message reporting the expected and actual status codes describes behaves like status code matcher has a failure message reporting the expected and actual status codes - has a negated failure message reporting the expected and actual status codes matching a response returns true for a response with code returns false for a response with a different code behaves like supports different response instances + has a failure message reporting it was given another type returns false given another type has a negated failure message reporting it was given another type - has a failure message reporting it was given another type - given an ActionDispatch::Response - returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code - given an ActionDispatch::TestResponse + given a Rack::MockResponse returns true for a response with the same code - http status :success - behaves like does not use deprecated methods for Rails 5.2+ - does not use deprecated method for Rails >= 5.2 - http status :not_found - behaves like supports different response instances - returns false given another type - has a failure message reporting it was given another type - has a negated failure message reporting it was given another type given an ActionDispatch::Response returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code - given something that acts as a Capybara::Session - returns true for a response with the same code - with general status code group :not_found + with general status code group :successful behaves like status code matcher - has a failure message reporting the expected and actual status codes has a negated failure message reporting the expected and actual status codes describes behaves like status code matcher + has a failure message reporting the expected and actual status codes matching a response returns true for a response with code returns false for a response with a different code behaves like supports different response instances has a failure message reporting it was given another type - has a negated failure message reporting it was given another type returns false given another type + has a negated failure message reporting it was given another type + given an ActionDispatch::TestResponse + returns true for a response with the same code + given an ActionDispatch::Response + returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code + http status :missing + behaves like does not use deprecated methods for Rails 5.2+ + does not use deprecated method for Rails >= 5.2 + with general status code group :missing + behaves like supports different response instances + has a negated failure message reporting it was given another type + has a failure message reporting it was given another type + returns false given another type + given something that acts as a Capybara::Session + returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code + given a Rack::MockResponse + returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code - with general status code group :server_error behaves like status code matcher - has a failure message reporting the expected and actual status codes describes behaves like status code matcher has a negated failure message reporting the expected and actual status codes + has a failure message reporting the expected and actual status codes matching a response returns false for a response with a different code returns true for a response with code + http status :server_error behaves like supports different response instances - returns false given another type has a failure message reporting it was given another type + returns false given another type has a negated failure message reporting it was given another type - given something that acts as a Capybara::Session - returns true for a response with the same code - given an ActionDispatch::Response - returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code - with deprecated rack status codes - supports the original names - with a nil status - raises an ArgumentError - with general status code group :success + given an ActionDispatch::Response + returns true for a response with the same code + given something that acts as a Capybara::Session + returns true for a response with the same code + with general status code group :not_found behaves like status code matcher - describes behaves like status code matcher has a negated failure message reporting the expected and actual status codes + describes behaves like status code matcher has a failure message reporting the expected and actual status codes matching a response returns true for a response with code returns false for a response with a different code behaves like supports different response instances has a failure message reporting it was given another type - has a negated failure message reporting it was given another type returns false given another type + has a negated failure message reporting it was given another type given a Rack::MockResponse returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code - given something that acts as a Capybara::Session - returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - with a symbolic status - raises an ArgumentError + given something that acts as a Capybara::Session + returns true for a response with the same code + with a numeric status code has a negated failure message reporting the expected status code - has a failure message reporting the expected and actual statuses - describes responding by the symbolic and associated numeric status code + has a failure message reporting the expected and actual status codes + describes responding with the numeric status code behaves like supports different response instances - returns false given another type has a failure message reporting it was given another type has a negated failure message reporting it was given another type + returns false given another type + given a Rack::MockResponse + returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code - matching a response - returns false for a response with a different code - returns true for a response with the equivalent code - with a numeric status code - has a failure message reporting the expected and actual status codes - describes responding with the numeric status code - has a negated failure message reporting the expected status code matching a response returns false for a response with a different code returns true for a response with the same code + with general status code group :success + behaves like status code matcher + describes behaves like status code matcher + has a negated failure message reporting the expected and actual status codes + has a failure message reporting the expected and actual status codes + matching a response + returns true for a response with code + returns false for a response with a different code behaves like supports different response instances - has a negated failure message reporting it was given another type - returns false given another type has a failure message reporting it was given another type - given an ActionDispatch::Response - returns true for a response with the same code - given something that acts as a Capybara::Session - returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code - given an ActionDispatch::TestResponse - returns true for a response with the same code - http status :error - behaves like does not use deprecated methods for Rails 5.2+ - does not use deprecated method for Rails >= 5.2 - http status :successful - behaves like supports different response instances returns false given another type - has a failure message reporting it was given another type has a negated failure message reporting it was given another type - given an ActionDispatch::TestResponse + given something that acts as a Capybara::Session returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code - given an ActionDispatch::Response - returns true for a response with the same code - given something that acts as a Capybara::Session - returns true for a response with the same code - http status :server_error - behaves like supports different response instances - returns false given another type - has a negated failure message reporting it was given another type - has a failure message reporting it was given another type given an ActionDispatch::TestResponse returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code - given something that acts as a Capybara::Session - returns true for a response with the same code - http status :missing - behaves like does not use deprecated methods for Rails 5.2+ - does not use deprecated method for Rails >= 5.2 - with general status code group :missing + http status :successful behaves like supports different response instances - has a failure message reporting it was given another type has a negated failure message reporting it was given another type returns false given another type - given a Rack::MockResponse + has a failure message reporting it was given another type + given something that acts as a Capybara::Session returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given something that acts as a Capybara::Session + given a Rack::MockResponse returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code - behaves like status code matcher - has a failure message reporting the expected and actual status codes - has a negated failure message reporting the expected and actual status codes - describes behaves like status code matcher - matching a response - returns true for a response with code - returns false for a response with a different code -RSpec::Rails::RoutingExampleGroup +route_to + provides a description + uses failure message from assert_recognizes + delegates to assert_recognizes + with should + when an exception is raised + raises that exception + when assert_recognizes fails with an assertion failure + fails with message from assert_recognizes + when assert_recognizes passes + passes + when assert_recognizes fails with a routing error + fails with message from assert_recognizes + with shortcut syntax + routes with multiple query parameters + routes with nested query parameters + routes without extra options + routes with extra options + routes with one query parameter + with should_not + when assert_recognizes fails with an assertion failure + passes + when an exception is raised + raises that exception + when assert_recognizes fails with a routing error + passes + when assert_recognizes passes + fails with custom message + +RSpec::Rails::ViewRendering + when render_views? is false + supports manipulating view paths with resolvers + supports manipulating view paths with arrays + supports manipulating view paths + with empty template resolver + works with strings + works with custom resolvers + default + ActionController::Base + does not render views in a nested group + does not render views + ActionController::Metal + renders views + #render_views + propagates to examples in nested groups properly + with no args + tells examples to render views + in a nested group + passes override to children + leaves the parent group as/is + overrides the value inherited from the parent group + with false + tells examples not to render views + with no args + tells examples to render views + with true + tells examples to render views + with false + tells examples not to render views + overrides the global config if render_views is enabled there + with true + tells examples to render views + +render_template + given a hash + delegates to assert_template + given a symbol + converts to_s and delegates to assert_template + given a string + delegates to assert_template + with should_not + when assert_template passes + fails with custom failure message + when fails due to some other exception + raises that exception + when assert_template fails + passes + when fails with a redirect + gives informative error message + with a badly formatted error message + falls back to something informative + with should + when fails due to some other exception + raises that exception + when assert_template fails + uses failure message from assert_template + when assert_template passes + passes + +be_new_record + a new record + passes + fails with custom failure message + a persisted record + fails with custom failure message + fails + +Configuration + has a default #file_fixture_path of 'spec/fixtures/files' + metadata `type: :feature` sets up feature example groups + adds 'vendor/' to the backtrace exclusions + #filter_rails_from_backtrace! adds exclusion patterns for rails gems + metadata `type: :request` sets up request example groups + metadata `type: :helper` sets up helper example groups + adds 'lib/rspec/rails' to the backtrace exclusions + metadata `type: :model` sets up model example groups + metadata `type: :controller` sets up controller example groups + metadata `type: :mailer` sets up mailer example groups + fixture support is included with metadata `:use_fixtures` + metadata `type: :view` sets up view example groups + metadata `type: :routing` sets up routing example groups + adds settings + `#infer_base_class_for_anonymous_controllers` is `true` by default + `#render_views?` is false by default + `#use_instantiated_fixtures?` is `false` by default + `#use_transactional_fixtures?` is `false` by default + `#rendering_views` is `nil` by default + `#use_instantiated_fixtures` is `nil` by default + `#use_transactional_examples` is an alias for `use_transactional_fixtures` + `#fixture_path` is `nil` by default + `#infer_base_class_for_anonymous_controllers?` is `true` by default + `#global_fixtures?` is `false` by default + `#render_views` sets `render_views?` to `true` + `#rendering_views?` is `false` by default + `#infer_base_class_for_anonymous_controllers?` is `true` by default + `#global_fixtures` is `nil` by default + `#use_transactional_fixtures` is `nil` by default + `#global_fixtures?` is `false` by default + `#fixture_path?` is `false` by default + `#rendering_views?` is `false` by default + `#fixture_path?` is `false` by default + `#use_transactional_fixtures?` is `false` by default + `#use_instantiated_fixtures?` is `false` by default + `#fixture_path=` + changes `fixture_path?` to the true for a truthy value + sets `fixture_path` to the provided value + `#use_instantiated_fixtures=` + sets `use_instantiated_fixtures` to the provided value + changes `use_instantiated_fixtures?` to the true for a truthy value + `#rendering_views=` + changes `rendering_views?` to the true for a truthy value + sets `rendering_views` to the provided value + `#infer_base_class_for_anonymous_controllers=` + changes `infer_base_class_for_anonymous_controllers?` to the true for a truthy value + sets `infer_base_class_for_anonymous_controllers` to the provided value + `#global_fixtures=` + changes `global_fixtures?` to the true for a truthy value + sets `global_fixtures` to the provided value + `#render_views=` + sets `render_views?` to the truthiness of the provided value + `#use_transactional_fixtures=` + sets `use_transactional_fixtures` to the provided value + changes `use_transactional_fixtures?` to the true for a truthy value + clears ActionMailer::Base::Deliveries after each example + only has deliveries from this test (e.g. from email@example.com) (PENDING: Temporarily skipped with xit) + only has deliveries from this test (e.g. from email_2@example.com) (PENDING: Temporarily skipped with xit) + #infer_spec_type_from_file_location! + sets the type to `:helper` for file path `spec/helpers` + sets the type to `:controller` for file path `spec/controllers` + sets the type to `:request` for file path `spec/requests` + sets the type to `:feature` for file path `spec/features` + sets the type to `:request` for file path `spec/integration` + sets the type to `:mailer` for file path `spec/mailers` + sets the type to `:request` for file path `spec/api` + sets the type to `:model` for file path `spec/models` + sets the type to `:routing` for file path `spec/routing` + sets the type to `:view` for file path `spec/views` + +have_rendered + with should_not + when fails with a redirect + gives informative error message + with a badly formatted error message + falls back to something informative + when assert_template fails + passes + when fails due to some other exception + raises that exception + when assert_template passes + fails with custom failure message + given a symbol + converts to_s and delegates to assert_template + with should + when fails due to some other exception + raises that exception + when assert_template fails + uses failure message from assert_template + when assert_template passes + passes + given a string + delegates to assert_template + given a hash + delegates to assert_template + +RSpec::Rails::HelperExampleGroup + provides a controller_path based on the helper module's name + #helper + includes ApplicationHelper + returns the instance of AV::Base provided by AV::TC::Behavior behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :routing` - for an example group defined in a file in the .\spec\routing\ directory + includes itself in example groups tagged with `type: :helper` + for an example group defined in a file in the ./spec/helpers/ directory + applies configured `before(:context)` hooks with `type: :helper` metadata allows users to override the type - applies configured `before(:context)` hooks with `type: :routing` metadata includes itself in the example group - tags groups in that directory with `type: :routing` - for an example group defined in a file in the ./spec/routing/ directory - applies configured `before(:context)` hooks with `type: :routing` metadata - tags groups in that directory with `type: :routing` + tags groups in that directory with `type: :helper` + for an example group defined in a file in the .\spec\helpers\ directory allows users to override the type + tags groups in that directory with `type: :helper` + applies configured `before(:context)` hooks with `type: :helper` metadata includes itself in the example group when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :routing` - for an example group defined in a file in the ./spec/routing/ directory - does not tag groups in that directory with `type: :routing` + includes itself in example groups tagged with `type: :helper` + for an example group defined in a file in the .\spec\helpers\ directory + does not tag groups in that directory with `type: :helper` does not include itself in the example group - for an example group defined in a file in the .\spec\routing\ directory + for an example group defined in a file in the ./spec/helpers/ directory does not include itself in the example group - does not tag groups in that directory with `type: :routing` - named routes - delegates them to the route_set + does not tag groups in that directory with `type: :helper` RSpec::Rails::SystemExampleGroup - #method_name - handles long method names which include unicode characters - converts special characters to underscores - hook order - calls Capybara.reset_sessions (TestUnit after_teardown) after any after hooks #driver sets :rack_test driver using by before_action - uses :selenium driver by default calls :driven_by method only once + uses :selenium driver by default + hook order + calls Capybara.reset_sessions (TestUnit after_teardown) after any after hooks + #after + sets the :extra_failure_lines metadata to an array of STDOUT lines behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is configured includes itself in example groups tagged with `type: :system` for an example group defined in a file in the ./spec/system/ directory - allows users to override the type + applies configured `before(:context)` hooks with `type: :system` metadata tags groups in that directory with `type: :system` + allows users to override the type includes itself in the example group - applies configured `before(:context)` hooks with `type: :system` metadata for an example group defined in a file in the .\spec\system\ directory - includes itself in the example group allows users to override the type - tags groups in that directory with `type: :system` applies configured `before(:context)` hooks with `type: :system` metadata + includes itself in the example group + tags groups in that directory with `type: :system` when `infer_spec_type_from_file_location!` is not configured includes itself in example groups tagged with `type: :system` for an example group defined in a file in the ./spec/system/ directory @@ -2200,445 +2346,335 @@ for an example group defined in a file in the .\spec\system\ directory does not include itself in the example group does not tag groups in that directory with `type: :system` - #after - sets the :extra_failure_lines metadata to an array of STDOUT lines + #method_name + converts special characters to underscores + handles long method names which include unicode characters RSpec::Rails::MailboxExampleGroup behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :mailbox` - for an example group defined in a file in the .\spec\mailboxes\ directory - does not include itself in the example group - does not tag groups in that directory with `type: :mailbox` - for an example group defined in a file in the ./spec/mailboxes/ directory - does not tag groups in that directory with `type: :mailbox` - does not include itself in the example group when `infer_spec_type_from_file_location!` is configured includes itself in example groups tagged with `type: :mailbox` for an example group defined in a file in the ./spec/mailboxes/ directory includes itself in the example group allows users to override the type - tags groups in that directory with `type: :mailbox` applies configured `before(:context)` hooks with `type: :mailbox` metadata + tags groups in that directory with `type: :mailbox` for an example group defined in a file in the .\spec\mailboxes\ directory includes itself in the example group - applies configured `before(:context)` hooks with `type: :mailbox` metadata - tags groups in that directory with `type: :mailbox` allows users to override the type - #have_failed - raises on unfailed mail - does not raise otherwise + tags groups in that directory with `type: :mailbox` + applies configured `before(:context)` hooks with `type: :mailbox` metadata + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :mailbox` + for an example group defined in a file in the ./spec/mailboxes/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :mailbox` + for an example group defined in a file in the .\spec\mailboxes\ directory + does not tag groups in that directory with `type: :mailbox` + does not include itself in the example group #have_been_delivered - does not raise otherwise raises on undelivered mail + does not raise otherwise #process sends mail to the mailbox #have_bounced does not raise otherwise raises on unbounced mail + #have_failed + does not raise otherwise + raises on unfailed mail -send_email - checks email sending by all params together - fails with a clear message - with to_not - fails with a clear message when no emails were sent - fails for multiple matches - fails with a clear message for negated version - checks email sending by no params - with a custom negated version defined - works with a negated version - fails with a clear message - with a compound negated version - works when first matching fails - works when both matchings pass - works when second matching fails - with compound matching - works when second matching fails - works when first matching fails - works when both matchings pass +should have_xxx + works with ActiveRecord::Associations::CollectionProxy -RSpec::Rails::ControllerExampleGroup - handles methods invoked via `method_missing` that use keywords - includes routing matchers - with inferred anonymous controller - defaults to inferring anonymous controller class - when infer_base_class_for_anonymous_controllers is true - infers the anonymous controller class when no ApplicationController is present - infers the anonymous controller class - when infer_base_class_for_anonymous_controllers is false - sets the anonymous controller class to ActiveController::Base when no ApplicationController is present - sets the anonymous controller class to ApplicationController - controller name - sets the name according to defined controller if it is not anonymous - sets name as AnonymousController if the controller is abstract - sets name as AnonymousController if defined as ApplicationController - sets name as AnonymousController if it inherits outer group's anonymous controller - sets the name as AnonymousController if it's anonymous - with implicit subject - doesn't cause let definition priority to be changed - uses the controller as the subject - in a namespace - controller name - sets the name according to the defined controller namespace if it is not anonymous - sets the name as 'AnonymousController' if the controller is abstract - #controller - delegates named route helpers to the underlying controller - calls NamedRouteCollection#route_defined? when it checks that given route is defined or not - with explicit subject - uses the specified subject instead of the controller - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :controller` - for an example group defined in a file in the .\spec\controllers\ directory - does not tag groups in that directory with `type: :controller` - does not include itself in the example group - for an example group defined in a file in the ./spec/controllers/ directory - does not tag groups in that directory with `type: :controller` - does not include itself in the example group - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :controller` - for an example group defined in a file in the .\spec\controllers\ directory - includes itself in the example group - allows users to override the type - applies configured `before(:context)` hooks with `type: :controller` metadata - tags groups in that directory with `type: :controller` - for an example group defined in a file in the ./spec/controllers/ directory - includes itself in the example group - allows users to override the type - applies configured `before(:context)` hooks with `type: :controller` metadata - tags groups in that directory with `type: :controller` - #bypass_rescue - overrides the rescue_with_handler method on the controller to raise submitted error +ActiveSupport::Relation match_array matcher + verifies that the scope returns the records on the right hand side, regardless of order + fails if the scope encompasses more records than on the right hand side + fails if the scope encompasses fewer records than on the right hand side + +RSpec::Rails::ViewSpecMethods + .add_extra_params_accessors_to + when accessors are not yet defined + adds them as instance methods + the added #extra_params reader + raises an error when a user tries to mutate it + when accessors are already defined + does not redefine them + .remove_extra_params_accessors_from + when accessors are defined + removes them + when accessors are not defined + does nothing + +be_valid matcher + includes the validation context if provided + does not include the validation context if not provided + includes a failure message for the negative case + uses a custom failure message if provided + includes a brief error message for the simplest implementation of validity + includes the error messages for simple implementations of error messages + includes the error messages in the failure message + includes a brief error message when error message is wrong arity + +be_routable + provides a description + with should_not + passes if routes do not recognize the path + fails if routes recognize the path + with should + fails if routes do not recognize the path + passes if routes recognize the path + +RSpec::Rails::FixtureSupport + handles namespaced fixtures + with use_transactional_tests set to false + does not wrap the test in a transaction + with use_transactional_fixtures set to false + still supports fixture_path/fixture_paths + with use_transactional_tests set to true + works with #uses_transaction helper RSpec::Rails::ViewExampleGroup + automatic inclusion of helpers + includes the namespaced helper with the same name + includes the helper with the same name + operates normally when no helper with the same name exists + operates normally when the view has no path and there is a Helper class defined + no application helper exists + operates normally + application helper exists + includes the application helper routes helpers collides with asset helpers uses routes helpers - #stub_template - caches FixtureResolver instances between example groups - prepends an ActionView::FixtureResolver to the view path - caches FixtureResolver instances between examples #_controller_path - with a nested _default_file_to_render - it returns the directory path with a common _default_file_to_render it returns the directory + with a nested _default_file_to_render + it returns the directory path + #stub_template + caches FixtureResolver instances between example groups + caches FixtureResolver instances between examples + prepends an ActionView::FixtureResolver to the view path #template - delegates to #view is deprecated - #view - delegates to _view - is accessible to configuration-level hooks - #render - given no input - sends render(:template => (described file)) to the view - converts the filename with variant into render options - converts the filename components into render options - converts the filename without format into render options - given a string - sends string as the first arg to render - given a hash - sends the hash as the first arg to render - automatic inclusion of helpers - includes the helper with the same name - operates normally when no helper with the same name exists - includes the namespaced helper with the same name - operates normally when the view has no path and there is a Helper class defined - application helper exists - includes the application helper - no application helper exists - operates normally + delegates to #view behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is configured includes itself in example groups tagged with `type: :view` for an example group defined in a file in the .\spec\views\ directory - includes itself in the example group - allows users to override the type tags groups in that directory with `type: :view` + allows users to override the type + includes itself in the example group applies configured `before(:context)` hooks with `type: :view` metadata for an example group defined in a file in the ./spec/views/ directory + allows users to override the type tags groups in that directory with `type: :view` includes itself in the example group applies configured `before(:context)` hooks with `type: :view` metadata - allows users to override the type when `infer_spec_type_from_file_location!` is not configured includes itself in example groups tagged with `type: :view` - for an example group defined in a file in the ./spec/views/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :view` for an example group defined in a file in the .\spec\views\ directory + does not include itself in the example group does not tag groups in that directory with `type: :view` + for an example group defined in a file in the ./spec/views/ directory does not include itself in the example group + does not tag groups in that directory with `type: :view` + #render + given a hash + sends the hash as the first arg to render + given a string + sends string as the first arg to render + given no input + converts the filename components into render options + converts the filename without format into render options + converts the filename with variant into render options + sends render(:template => (described file)) to the view + #view + delegates to _view + is accessible to configuration-level hooks #params delegates to the controller +RSpec::Rails + has no malformed whitespace + redirect_to with should_not when assert_redirected_to passes fails with custom failure message - when assert_redirected_to fails - passes when fails due to some other exception raises that exception + when assert_redirected_to fails + passes with should when assert_redirected_to passes passes - when assert_redirected_to fails - uses failure message from assert_redirected_to when fails due to some other exception raises that exception + when assert_redirected_to fails + uses failure message from assert_redirected_to -RSpec::Rails::ViewRendering - #render_views - propagates to examples in nested groups properly - with no args - tells examples to render views - with false - tells examples not to render views - overrides the global config if render_views is enabled there - in a nested group - passes override to children - overrides the value inherited from the parent group - leaves the parent group as/is - with false - tells examples not to render views - with true - tells examples to render views - with no args - tells examples to render views - with true - tells examples to render views - default - ActionController::Metal - renders views - ActionController::Base - does not render views - does not render views in a nested group - when render_views? is false - supports manipulating view paths - supports manipulating view paths with resolvers - supports manipulating view paths with arrays - with empty template resolver - works with strings - works with custom resolvers - -RSpec::Rails::ViewSpecMethods - .remove_extra_params_accessors_from - when accessors are not defined - does nothing - when accessors are defined - removes them - .add_extra_params_accessors_to - when accessors are already defined - does not redefine them - when accessors are not yet defined - adds them as instance methods - the added #extra_params reader - raises an error when a user tries to mutate it - -RSpec::Rails - has no malformed whitespace - -RSpec::Rails::HelperExampleGroup::ClassMethods - determine_default_helper_class - the described is a class - returns nil - the described is a module - returns the module - -be_new_record - a new record - passes - fails with custom failure message - a persisted record - fails with custom failure message - fails - -be_valid matcher - includes the error messages for simple implementations of error messages - uses a custom failure message if provided - includes a brief error message for the simplest implementation of validity - includes the validation context if provided - includes the error messages in the failure message - includes a failure message for the negative case - does not include the validation context if not provided - includes a brief error message when error message is wrong arity - -RSpec::Rails::MinitestLifecycleAdapter - invokes minitest lifecycle hooks at the appropriate times - allows let variables named 'send' +RSpec::Rails::RoutingExampleGroup + named routes + delegates them to the route_set + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :routing` + for an example group defined in a file in the ./spec/routing/ directory + includes itself in the example group + applies configured `before(:context)` hooks with `type: :routing` metadata + allows users to override the type + tags groups in that directory with `type: :routing` + for an example group defined in a file in the .\spec\routing\ directory + tags groups in that directory with `type: :routing` + includes itself in the example group + allows users to override the type + applies configured `before(:context)` hooks with `type: :routing` metadata + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :routing` + for an example group defined in a file in the .\spec\routing\ directory + does not include itself in the example group + does not tag groups in that directory with `type: :routing` + for an example group defined in a file in the ./spec/routing/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :routing` -RSpec::Rails::SetupAndTeardownAdapter - .setup - registers teardown hooks in the order setup is received - registers before hooks in the order setup is received - registers prepend_before hooks for the Rails' setup methods +ActiveJob matchers + have_been_enqueued + passes with default jobs count (exactly one) + accepts composable matchers as an at date + passes when negated + fails when job is not enqueued + fails when negated and several jobs enqueued + counts all enqueued jobs + Active Job test helpers + does not raise that "assert_nothing_raised" is undefined + have_performed_job + reports correct number in fail error message + fails when negated and job is performed + passes with default jobs count (exactly one) + fails when job is not performed + passes with job name + fails with with block with incorrect data + generates failure message with all provided options + passes with provided arguments + counts only jobs performed in block + passes with :thrice count + raises ArgumentError when no Proc passed to expect + passes with provided queue name as string + generates failure message with at most hint + passes with :twice count + passes with provided at date + passes when negated + throws descriptive error when no test adapter set + passes with :once count + fails when too many jobs performed + passes with provided queue name as symbol + passes deserialized arguments to with block + passes multiple arguments to with block + passes with at_most count when performed jobs are under limit + passes with provided arguments containing global id object + only calls with block if other conditions are met + generates failure message with at least hint + passes with multiple jobs + passes with at_least count when performed jobs are over limit + passes with provided argument matchers + have_enqueued_job + generates failure message with all provided options + accepts composable matchers as an at date + passes with at_least count when enqueued jobs are over limit + passes with ActiveSupport::TimeWithZone + raises ArgumentError when no Proc passed to expect + only calls with block if other conditions are met + passes with provided queue name as symbol + ignores undeserializable arguments + passes with :thrice count + does not have an enqueued job when providing at of :no_wait and there is a wait + passes with default jobs count (exactly one) + has an enqueued job when providing at of :no_wait and there is no wait + passes with provided at time + warns when time offsets are inprecise + passes with provided arguments + fails when too many jobs enqueued + reports correct number in fail error message + works with time offsets + passes with provided argument matchers + passes with Time + fails with with block with incorrect data + fails when negated and several jobs enqueued + passes with provided queue name as string + fails when job is not enqueued + generates failure message with at most hint + passes with provided at date + passes with :twice count + generates failure message with at least hint + passes when using alias + throws descriptive error when no test adapter set + has an enqueued job when not providing at and there is a wait + passes with job name + passes deserialized arguments to with block + passes when negated + passes with multiple jobs + counts only jobs enqueued in block + passes with provided arguments containing global id object + passes with :once count + passes multiple arguments to with block + has an enqueued job when providing at and there is no wait + fails when negated and job is enqueued + passes with at_most count when enqueued jobs are under limit + when previously enqueued jobs were performed + counts newly enqueued jobs + when job is retried + passes with reenqueued job + have_been_performed + fails when job is not performed + passes when negated + counts all performed jobs + passes with default jobs count (exactly one) -be_a_new matcher - new record - wrong class - fails - right class - passes - #with - right class and new record - with composable matchers - two attributes are composable matchers - only one matcher present in actual - fails - both matchers present in actual - passes - one attribute is a composable matcher - fails - passes - matcher is wrong type - fails - no attributes same - fails - all attributes same - passes - one attribute value not the same - fails - one attribute same - passes - wrong class and existing record - no attributes same - fails - one attribute value not the same - fails - all attributes same - fails - existing record - right class - fails - wrong class - fails +ActiveRecord support + with partial double verification disabled + allows you to stub abstract classes + allows you to stub `ActiveRecord::Base` + with partial double verification enabled + allows you to stub `ActiveRecord::Base` + allows you to stub abstract classes have_broadcasted_to matchers have_broadcasted_to - passes when using symbol target - reports correct number in fail error message - passes with provided data matchers - fails when message is not sent - fails when negated and message is sent + passes with default messages count (exactly one) + raises ArgumentError when no Proc passed to expect + passes when using alias + passes with multiple streams fails when too many messages broadcast - passes with at_least count when sent messages are over limit passes with provided data - counts only messages sent in block + generates failure message with at least hint passes with :thrice count + passes with provided data matchers with anything + passes with at_least count when sent messages are over limit generates failure message with at most hint - passes with default messages count (exactly one) - passes when using alias fails with with block with incorrect data - generates failure message with at least hint - passes with provided data matchers with anything - throws descriptive error when no test adapter set - raises ArgumentError when no Proc passed to expect - passes when negated - passes with multiple streams - passes with at_most count when sent messages are under limit generates failure message when data not match - passes with :once count + counts only messages sent in block passes with :twice count + passes when negated + passes with :once count + passes with provided data matchers + fails when message is not sent + passes with at_most count when sent messages are under limit + passes when using symbol target + fails when negated and message is sent + reports correct number in fail error message + throws descriptive error when no test adapter set when object is passed as first argument when channel can't be inferred raises exception when channel is present passes -RSpec::Rails::RequestExampleGroup - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :request` - for an example group defined in a file in the .\spec\integration\ directory - allows users to override the type - tags groups in that directory with `type: :request` - includes itself in the example group - applies configured `before(:context)` hooks with `type: :request` metadata - for an example group defined in a file in the ./spec/api/ directory - applies configured `before(:context)` hooks with `type: :request` metadata - tags groups in that directory with `type: :request` - includes itself in the example group - allows users to override the type - for an example group defined in a file in the .\spec\api\ directory - tags groups in that directory with `type: :request` - allows users to override the type - includes itself in the example group - applies configured `before(:context)` hooks with `type: :request` metadata - for an example group defined in a file in the ./spec/requests/ directory - includes itself in the example group - allows users to override the type - applies configured `before(:context)` hooks with `type: :request` metadata - tags groups in that directory with `type: :request` - for an example group defined in a file in the .\spec\requests\ directory - tags groups in that directory with `type: :request` - applies configured `before(:context)` hooks with `type: :request` metadata - allows users to override the type - includes itself in the example group - for an example group defined in a file in the ./spec/integration/ directory - includes itself in the example group - tags groups in that directory with `type: :request` - allows users to override the type - applies configured `before(:context)` hooks with `type: :request` metadata - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :request` - for an example group defined in a file in the ./spec/api/ directory - does not tag groups in that directory with `type: :request` - does not include itself in the example group - for an example group defined in a file in the .\spec\integration\ directory - does not tag groups in that directory with `type: :request` - does not include itself in the example group - for an example group defined in a file in the ./spec/integration/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :request` - for an example group defined in a file in the ./spec/requests/ directory - does not tag groups in that directory with `type: :request` - does not include itself in the example group - for an example group defined in a file in the .\spec\api\ directory - does not tag groups in that directory with `type: :request` - does not include itself in the example group - for an example group defined in a file in the .\spec\requests\ directory - does not tag groups in that directory with `type: :request` - does not include itself in the example group - -RSpec::Rails::FixtureFileUploadSupport - with fixture path not set - resolves fixture using relative path - with fixture path set in spec - resolves fixture file - with fixture path set in config - resolves supports `Pathname` objects - resolves fixture file - -have_rendered - with should - when assert_template passes - passes - when fails due to some other exception - raises that exception - when assert_template fails - uses failure message from assert_template - with should_not - when assert_template passes - fails with custom failure message - when assert_template fails - passes - when fails with a redirect - gives informative error message - with a badly formatted error message - falls back to something informative - when fails due to some other exception - raises that exception - given a symbol - converts to_s and delegates to assert_template - given a string - delegates to assert_template - given a hash - delegates to assert_template - Pending: (Failures listed here are expected and do not affect your suite's status) 1) Configuration clears ActionMailer::Base::Deliveries after each example only has deliveries from this test (e.g. from email@example.com) @@ -2649,10 +2685,10 @@ # Temporarily skipped with xit # ./spec/rspec/rails/configuration_spec.rb:378 -Finished in 6.17 seconds (files took 5.69 seconds to load) +Finished in 3.72 seconds (files took 2.94 seconds to load) 818 examples, 0 failures, 2 pending -Randomized with seed 12451 +Randomized with seed 15307 /usr/bin/ruby3.1 /usr/bin/gem2deb-test-runner @@ -2669,563 +2705,142 @@ RUBYLIB=. GEM_PATH=/build/reproducible-path/ruby-rspec-rails-6.1.5/debian/ruby-rspec-rails/usr/share/rubygems-integration/all:/build/reproducible-path/ruby-rspec-rails-6.1.5/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.1.0:/var/lib/gems/3.1.0:/usr/local/lib/ruby/gems/3.1.0:/usr/lib/ruby/gems/3.1.0:/usr/lib/aarch64-linux-gnu/ruby/gems/3.1.0:/usr/share/rubygems-integration/3.1.0:/usr/share/rubygems-integration/all:/usr/lib/aarch64-linux-gnu/rubygems-integration/3.1.0 ruby3.1 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake /usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec ./spec/rspec/rails/active_model_spec.rb ./spec/rspec/rails/active_record_spec.rb ./spec/rspec/rails/assertion_adapter_spec.rb ./spec/rspec/rails/assertion_delegator_spec.rb ./spec/rspec/rails/configuration_spec.rb ./spec/rspec/rails/example/channel_example_group_spec.rb ./spec/rspec/rails/example/controller_example_group_spec.rb ./spec/rspec/rails/example/feature_example_group_spec.rb ./spec/rspec/rails/example/helper_example_group_spec.rb ./spec/rspec/rails/example/job_example_group_spec.rb ./spec/rspec/rails/example/mailbox_example_group_spec.rb ./spec/rspec/rails/example/model_example_group_spec.rb ./spec/rspec/rails/example/rails_example_group_spec.rb ./spec/rspec/rails/example/request_example_group_spec.rb ./spec/rspec/rails/example/routing_example_group_spec.rb ./spec/rspec/rails/example/system_example_group_spec.rb ./spec/rspec/rails/example/view_example_group_spec.rb ./spec/rspec/rails/fixture_file_upload_support_spec.rb ./spec/rspec/rails/fixture_support_spec.rb ./spec/rspec/rails/matchers/action_cable/have_broadcasted_to_spec.rb ./spec/rspec/rails/matchers/action_cable/have_stream_spec.rb ./spec/rspec/rails/matchers/action_mailbox_spec.rb ./spec/rspec/rails/matchers/active_job_spec.rb ./spec/rspec/rails/matchers/be_a_new_spec.rb ./spec/rspec/rails/matchers/be_new_record_spec.rb ./spec/rspec/rails/matchers/be_routable_spec.rb ./spec/rspec/rails/matchers/be_valid_spec.rb ./spec/rspec/rails/matchers/has_spec.rb ./spec/rspec/rails/matchers/have_enqueued_mail_spec.rb ./spec/rspec/rails/matchers/have_http_status_spec.rb ./spec/rspec/rails/matchers/have_rendered_spec.rb ./spec/rspec/rails/matchers/redirect_to_spec.rb ./spec/rspec/rails/matchers/relation_match_array_spec.rb ./spec/rspec/rails/matchers/route_to_spec.rb ./spec/rspec/rails/matchers/send_email_spec.rb ./spec/rspec/rails/minitest_lifecycle_adapter_spec.rb ./spec/rspec/rails/setup_and_teardown_adapter_spec.rb ./spec/rspec/rails/view_rendering_spec.rb ./spec/rspec/rails/view_spec_methods_spec.rb ./spec/rspec/rails_spec.rb --format documentation -Randomized with seed 1884 - -render_template - given a hash - delegates to assert_template - given a symbol - converts to_s and delegates to assert_template - with should_not - when fails due to some other exception - raises that exception - when assert_template passes - fails with custom failure message - when assert_template fails - passes - when fails with a redirect - gives informative error message - with a badly formatted error message - falls back to something informative - with should - when assert_template fails - uses failure message from assert_template - when fails due to some other exception - raises that exception - when assert_template passes - passes - given a string - delegates to assert_template - -RSpec::Rails::ViewExampleGroup - automatic inclusion of helpers - includes the namespaced helper with the same name - operates normally when no helper with the same name exists - includes the helper with the same name - operates normally when the view has no path and there is a Helper class defined - no application helper exists - operates normally - application helper exists - includes the application helper - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :view` - for an example group defined in a file in the ./spec/views/ directory - applies configured `before(:context)` hooks with `type: :view` metadata - tags groups in that directory with `type: :view` - allows users to override the type - includes itself in the example group - for an example group defined in a file in the .\spec\views\ directory - applies configured `before(:context)` hooks with `type: :view` metadata - allows users to override the type - includes itself in the example group - tags groups in that directory with `type: :view` - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :view` - for an example group defined in a file in the ./spec/views/ directory - does not tag groups in that directory with `type: :view` - does not include itself in the example group - for an example group defined in a file in the .\spec\views\ directory - does not tag groups in that directory with `type: :view` - does not include itself in the example group - routes helpers collides with asset helpers - uses routes helpers - #stub_template - prepends an ActionView::FixtureResolver to the view path - caches FixtureResolver instances between example groups - caches FixtureResolver instances between examples - #view - delegates to _view - is accessible to configuration-level hooks - #params - delegates to the controller - #template - is deprecated - delegates to #view - #render - given no input - converts the filename without format into render options - converts the filename with variant into render options - converts the filename components into render options - sends render(:template => (described file)) to the view - given a hash - sends the hash as the first arg to render - given a string - sends string as the first arg to render - #_controller_path - with a nested _default_file_to_render - it returns the directory path - with a common _default_file_to_render - it returns the directory - -RSpec::Rails::MailboxExampleGroup - #have_failed - does not raise otherwise - raises on unfailed mail - #process - sends mail to the mailbox - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :mailbox` - for an example group defined in a file in the .\spec\mailboxes\ directory - allows users to override the type - tags groups in that directory with `type: :mailbox` - includes itself in the example group - applies configured `before(:context)` hooks with `type: :mailbox` metadata - for an example group defined in a file in the ./spec/mailboxes/ directory - tags groups in that directory with `type: :mailbox` - applies configured `before(:context)` hooks with `type: :mailbox` metadata - allows users to override the type - includes itself in the example group - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :mailbox` - for an example group defined in a file in the ./spec/mailboxes/ directory - does not tag groups in that directory with `type: :mailbox` - does not include itself in the example group - for an example group defined in a file in the .\spec\mailboxes\ directory - does not tag groups in that directory with `type: :mailbox` - does not include itself in the example group - #have_been_delivered - raises on undelivered mail - does not raise otherwise - #have_bounced - does not raise otherwise - raises on unbounced mail - -ActiveJob matchers - have_performed_job - passes with provided arguments containing global id object - generates failure message with at least hint - passes with at_most count when performed jobs are under limit - passes with at_least count when performed jobs are over limit - passes with provided at date - passes with multiple jobs - passes with :twice count - passes with :once count - passes multiple arguments to with block - only calls with block if other conditions are met - passes with provided queue name as string - raises ArgumentError when no Proc passed to expect - passes when negated - passes with job name - fails when job is not performed - counts only jobs performed in block - generates failure message with all provided options - reports correct number in fail error message - passes with provided arguments - passes with :thrice count - passes deserialized arguments to with block - passes with provided argument matchers - generates failure message with at most hint - fails when too many jobs performed - passes with provided queue name as symbol - throws descriptive error when no test adapter set - fails when negated and job is performed - passes with default jobs count (exactly one) - fails with with block with incorrect data - have_been_enqueued - passes when negated - fails when negated and several jobs enqueued - fails when job is not enqueued - accepts composable matchers as an at date - passes with default jobs count (exactly one) - counts all enqueued jobs - Active Job test helpers - does not raise that "assert_nothing_raised" is undefined - have_been_performed - passes when negated - fails when job is not performed - passes with default jobs count (exactly one) - counts all performed jobs - have_enqueued_job - passes with at_least count when enqueued jobs are over limit - has an enqueued job when providing at of :no_wait and there is no wait - generates failure message with at most hint - ignores undeserializable arguments - warns when time offsets are inprecise - passes with provided queue name as string - fails with with block with incorrect data - raises ArgumentError when no Proc passed to expect - passes with provided queue name as symbol - throws descriptive error when no test adapter set - passes with at_most count when enqueued jobs are under limit - fails when negated and job is enqueued - passes with :twice count - fails when too many jobs enqueued - passes with job name - passes with provided arguments containing global id object - passes with ActiveSupport::TimeWithZone - reports correct number in fail error message - passes with multiple jobs - passes with :once count - passes deserialized arguments to with block - passes with provided at date - passes with provided arguments - accepts composable matchers as an at date - has an enqueued job when not providing at and there is a wait - generates failure message with at least hint - only calls with block if other conditions are met - counts only jobs enqueued in block - passes with provided argument matchers - passes with provided at time - generates failure message with all provided options - has an enqueued job when providing at and there is no wait - passes with default jobs count (exactly one) - works with time offsets - passes when using alias - fails when negated and several jobs enqueued - passes with Time - does not have an enqueued job when providing at of :no_wait and there is a wait - passes multiple arguments to with block - fails when job is not enqueued - passes with :thrice count - passes when negated - when previously enqueued jobs were performed - counts newly enqueued jobs - when job is retried - passes with reenqueued job - -RSpec::Rails - has no malformed whitespace - -RSpec::Rails::HelperExampleGroup - provides a controller_path based on the helper module's name - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :helper` - for an example group defined in a file in the .\spec\helpers\ directory - allows users to override the type - includes itself in the example group - applies configured `before(:context)` hooks with `type: :helper` metadata - tags groups in that directory with `type: :helper` - for an example group defined in a file in the ./spec/helpers/ directory - includes itself in the example group - applies configured `before(:context)` hooks with `type: :helper` metadata - tags groups in that directory with `type: :helper` - allows users to override the type - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :helper` - for an example group defined in a file in the .\spec\helpers\ directory - does not include itself in the example group - does not tag groups in that directory with `type: :helper` - for an example group defined in a file in the ./spec/helpers/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :helper` - #helper - returns the instance of AV::Base provided by AV::TC::Behavior - includes ApplicationHelper +Randomized with seed 44056 Configuration - fixture support is included with metadata `:use_fixtures` - metadata `type: :controller` sets up controller example groups - adds 'vendor/' to the backtrace exclusions - metadata `type: :helper` sets up helper example groups - has a default #file_fixture_path of 'spec/fixtures/files' metadata `type: :routing` sets up routing example groups - metadata `type: :mailer` sets up mailer example groups #filter_rails_from_backtrace! adds exclusion patterns for rails gems + metadata `type: :feature` sets up feature example groups + metadata `type: :model` sets up model example groups metadata `type: :view` sets up view example groups metadata `type: :request` sets up request example groups - metadata `type: :model` sets up model example groups adds 'lib/rspec/rails' to the backtrace exclusions - metadata `type: :feature` sets up feature example groups + metadata `type: :controller` sets up controller example groups + fixture support is included with metadata `:use_fixtures` + has a default #file_fixture_path of 'spec/fixtures/files' + metadata `type: :mailer` sets up mailer example groups + metadata `type: :helper` sets up helper example groups + adds 'vendor/' to the backtrace exclusions + #infer_spec_type_from_file_location! + sets the type to `:request` for file path `spec/integration` + sets the type to `:controller` for file path `spec/controllers` + sets the type to `:view` for file path `spec/views` + sets the type to `:mailer` for file path `spec/mailers` + sets the type to `:request` for file path `spec/api` + sets the type to `:request` for file path `spec/requests` + sets the type to `:feature` for file path `spec/features` + sets the type to `:model` for file path `spec/models` + sets the type to `:helper` for file path `spec/helpers` + sets the type to `:routing` for file path `spec/routing` adds settings - `#use_transactional_fixtures?` is `false` by default - `#rendering_views?` is `false` by default - `#use_transactional_fixtures?` is `false` by default + `#use_instantiated_fixtures?` is `false` by default `#global_fixtures` is `nil` by default - `#rendering_views` is `nil` by default - `#fixture_path` is `nil` by default - `#infer_base_class_for_anonymous_controllers?` is `true` by default - `#use_transactional_examples` is an alias for `use_transactional_fixtures` + `#use_instantiated_fixtures` is `nil` by default `#render_views` sets `render_views?` to `true` - `#fixture_path?` is `false` by default + `#infer_base_class_for_anonymous_controllers` is `true` by default `#use_instantiated_fixtures?` is `false` by default + `#use_transactional_fixtures?` is `false` by default + `#fixture_path?` is `false` by default `#render_views?` is false by default `#use_transactional_fixtures` is `nil` by default + `#rendering_views?` is `false` by default `#global_fixtures?` is `false` by default - `#infer_base_class_for_anonymous_controllers` is `true` by default - `#global_fixtures?` is `false` by default - `#use_instantiated_fixtures?` is `false` by default + `#infer_base_class_for_anonymous_controllers?` is `true` by default + `#use_transactional_examples` is an alias for `use_transactional_fixtures` `#rendering_views?` is `false` by default `#infer_base_class_for_anonymous_controllers?` is `true` by default + `#fixture_path` is `nil` by default + `#use_transactional_fixtures?` is `false` by default `#fixture_path?` is `false` by default - `#use_instantiated_fixtures` is `nil` by default - `#infer_base_class_for_anonymous_controllers=` - sets `infer_base_class_for_anonymous_controllers` to the provided value - changes `infer_base_class_for_anonymous_controllers?` to the true for a truthy value - `#global_fixtures=` - changes `global_fixtures?` to the true for a truthy value - sets `global_fixtures` to the provided value + `#rendering_views` is `nil` by default + `#global_fixtures?` is `false` by default `#rendering_views=` changes `rendering_views?` to the true for a truthy value sets `rendering_views` to the provided value - `#use_instantiated_fixtures=` - sets `use_instantiated_fixtures` to the provided value - changes `use_instantiated_fixtures?` to the true for a truthy value - `#fixture_path=` - sets `fixture_path` to the provided value - changes `fixture_path?` to the true for a truthy value + `#global_fixtures=` + changes `global_fixtures?` to the true for a truthy value + sets `global_fixtures` to the provided value + `#infer_base_class_for_anonymous_controllers=` + sets `infer_base_class_for_anonymous_controllers` to the provided value + changes `infer_base_class_for_anonymous_controllers?` to the true for a truthy value `#use_transactional_fixtures=` sets `use_transactional_fixtures` to the provided value changes `use_transactional_fixtures?` to the true for a truthy value + `#fixture_path=` + sets `fixture_path` to the provided value + changes `fixture_path?` to the true for a truthy value + `#use_instantiated_fixtures=` + sets `use_instantiated_fixtures` to the provided value + changes `use_instantiated_fixtures?` to the true for a truthy value `#render_views=` sets `render_views?` to the truthiness of the provided value clears ActionMailer::Base::Deliveries after each example only has deliveries from this test (e.g. from email@example.com) (PENDING: Temporarily skipped with xit) only has deliveries from this test (e.g. from email_2@example.com) (PENDING: Temporarily skipped with xit) - #infer_spec_type_from_file_location! - sets the type to `:helper` for file path `spec/helpers` - sets the type to `:mailer` for file path `spec/mailers` - sets the type to `:request` for file path `spec/api` - sets the type to `:model` for file path `spec/models` - sets the type to `:request` for file path `spec/requests` - sets the type to `:request` for file path `spec/integration` - sets the type to `:routing` for file path `spec/routing` - sets the type to `:controller` for file path `spec/controllers` - sets the type to `:view` for file path `spec/views` - sets the type to `:feature` for file path `spec/features` -RSpec::Rails::HelperExampleGroup::ClassMethods - determine_default_helper_class - the described is a class - returns nil - the described is a module - returns the module - -redirect_to - with should_not - when assert_redirected_to passes - fails with custom failure message - when fails due to some other exception - raises that exception - when assert_redirected_to fails - passes - with should - when assert_redirected_to fails - uses failure message from assert_redirected_to - when fails due to some other exception - raises that exception - when assert_redirected_to passes - passes - -RSpec::Rails::AssertionDelegator - provides a module that delegates assertion methods to an isolated class - delegates back to the including instance for methods the assertion module requires - does not delegate method_missing - -RSpec::Rails::MinitestLifecycleAdapter - allows let variables named 'send' - invokes minitest lifecycle hooks at the appropriate times - -RSpec::Rails::FeatureExampleGroup - includes Rails route helpers - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :feature` - for an example group defined in a file in the .\spec\features\ directory - does not tag groups in that directory with `type: :feature` - does not include itself in the example group - for an example group defined in a file in the ./spec/features/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :feature` - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :feature` - for an example group defined in a file in the ./spec/features/ directory - tags groups in that directory with `type: :feature` - applies configured `before(:context)` hooks with `type: :feature` metadata - allows users to override the type - includes itself in the example group - for an example group defined in a file in the .\spec\features\ directory - allows users to override the type - applies configured `before(:context)` hooks with `type: :feature` metadata - includes itself in the example group - tags groups in that directory with `type: :feature` - when nested inside a request example group - includes Rails route helpers - #visit - is resistant to load order errors - raises an error informing about missing Capybara - -RSpec::Rails::ViewRendering - #render_views - propagates to examples in nested groups properly - with no args - tells examples to render views - in a nested group - overrides the value inherited from the parent group - leaves the parent group as/is - passes override to children - with true - tells examples to render views - with no args - tells examples to render views - with false - tells examples not to render views - with true - tells examples to render views - with false - tells examples not to render views - overrides the global config if render_views is enabled there - default - ActionController::Base - does not render views - does not render views in a nested group - ActionController::Metal - renders views - when render_views? is false - supports manipulating view paths with resolvers - supports manipulating view paths with arrays - supports manipulating view paths - with empty template resolver - works with custom resolvers - works with strings - -RSpec::Rails::ChannelExampleGroup - behaves like an rspec-rails example group mixin - adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :channel` - for an example group defined in a file in the .\spec\channels\ directory - does not tag groups in that directory with `type: :channel` - does not include itself in the example group - for an example group defined in a file in the ./spec/channels/ directory - does not tag groups in that directory with `type: :channel` - does not include itself in the example group - when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :channel` - for an example group defined in a file in the .\spec\channels\ directory - allows users to override the type - tags groups in that directory with `type: :channel` - includes itself in the example group - applies configured `before(:context)` hooks with `type: :channel` metadata - for an example group defined in a file in the ./spec/channels/ directory - allows users to override the type - tags groups in that directory with `type: :channel` - applies configured `before(:context)` hooks with `type: :channel` metadata - includes itself in the example group - -be_valid matcher - includes a brief error message for the simplest implementation of validity - includes the error messages for simple implementations of error messages - does not include the validation context if not provided - includes a brief error message when error message is wrong arity - uses a custom failure message if provided - includes the error messages in the failure message - includes a failure message for the negative case - includes the validation context if provided - -ActiveModel support - with partial double verification enabled - allows you to stub instances of `ActiveModel` - allows you to stub `ActiveModel` - with partial double verification disabled - allows you to stub instances of `ActiveModel` - allows you to stub `ActiveModel` - -should have_xxx - works with ActiveRecord::Associations::CollectionProxy - -RSpec::Rails::ViewSpecMethods - .remove_extra_params_accessors_from - when accessors are defined - removes them - when accessors are not defined - does nothing - .add_extra_params_accessors_to - when accessors are already defined - does not redefine them - when accessors are not yet defined - adds them as instance methods - the added #extra_params reader - raises an error when a user tries to mutate it +RSpec::Rails::SetupAndTeardownAdapter + .setup + registers before hooks in the order setup is received + registers teardown hooks in the order setup is received + registers prepend_before hooks for the Rails' setup methods send_email - fails with a clear message - checks email sending by all params together - fails with a clear message when no emails were sent - fails for multiple matches with to_not + fails with a clear message when no emails were sent + fails with a clear message fails with a clear message for negated version + fails for multiple matches + checks email sending by all params together checks email sending by no params - with compound matching - works when first matching fails - works when second matching fails - works when both matchings pass with a custom negated version defined - fails with a clear message works with a negated version + fails with a clear message with a compound negated version works when both matchings pass works when first matching fails works when second matching fails + with compound matching + works when second matching fails + works when both matchings pass + works when first matching fails -RSpec::Rails::JobExampleGroup +RSpec::Rails::HelperExampleGroup + provides a controller_path based on the helper module's name + #helper + includes ApplicationHelper + returns the instance of AV::Base provided by AV::TC::Behavior behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :helper` + for an example group defined in a file in the ./spec/helpers/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :helper` + for an example group defined in a file in the .\spec\helpers\ directory + does not tag groups in that directory with `type: :helper` + does not include itself in the example group when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :job` - for an example group defined in a file in the .\spec\jobs\ directory + includes itself in example groups tagged with `type: :helper` + for an example group defined in a file in the .\spec\helpers\ directory includes itself in the example group - applies configured `before(:context)` hooks with `type: :job` metadata - tags groups in that directory with `type: :job` allows users to override the type - for an example group defined in a file in the ./spec/jobs/ directory + tags groups in that directory with `type: :helper` + applies configured `before(:context)` hooks with `type: :helper` metadata + for an example group defined in a file in the ./spec/helpers/ directory + tags groups in that directory with `type: :helper` includes itself in the example group - applies configured `before(:context)` hooks with `type: :job` metadata - tags groups in that directory with `type: :job` + applies configured `before(:context)` hooks with `type: :helper` metadata allows users to override the type - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :job` - for an example group defined in a file in the .\spec\jobs\ directory - does not tag groups in that directory with `type: :job` - does not include itself in the example group - for an example group defined in a file in the ./spec/jobs/ directory - does not include itself in the example group - does not tag groups in that directory with `type: :job` - -have_rendered - given a hash - delegates to assert_template - with should - when assert_template fails - uses failure message from assert_template - when fails due to some other exception - raises that exception - when assert_template passes - passes - with should_not - when fails due to some other exception - raises that exception - when assert_template fails - passes - when fails with a redirect - gives informative error message - with a badly formatted error message - falls back to something informative - when assert_template passes - fails with custom failure message - given a symbol - converts to_s and delegates to assert_template - given a string - delegates to assert_template RSpec::Rails::RequestExampleGroup behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is not configured includes itself in example groups tagged with `type: :request` - for an example group defined in a file in the ./spec/requests/ directory - does not tag groups in that directory with `type: :request` + for an example group defined in a file in the ./spec/integration/ directory does not include itself in the example group - for an example group defined in a file in the ./spec/api/ directory does not tag groups in that directory with `type: :request` - does not include itself in the example group - for an example group defined in a file in the .\spec\requests\ directory + for an example group defined in a file in the ./spec/api/ directory does not tag groups in that directory with `type: :request` does not include itself in the example group for an example group defined in a file in the .\spec\api\ directory @@ -3234,251 +2849,323 @@ for an example group defined in a file in the .\spec\integration\ directory does not tag groups in that directory with `type: :request` does not include itself in the example group - for an example group defined in a file in the ./spec/integration/ directory + for an example group defined in a file in the ./spec/requests/ directory does not include itself in the example group does not tag groups in that directory with `type: :request` + for an example group defined in a file in the .\spec\requests\ directory + does not tag groups in that directory with `type: :request` + does not include itself in the example group when `infer_spec_type_from_file_location!` is configured includes itself in example groups tagged with `type: :request` - for an example group defined in a file in the ./spec/integration/ directory + for an example group defined in a file in the .\spec\requests\ directory + tags groups in that directory with `type: :request` applies configured `before(:context)` hooks with `type: :request` metadata allows users to override the type includes itself in the example group - tags groups in that directory with `type: :request` - for an example group defined in a file in the ./spec/requests/ directory - allows users to override the type + for an example group defined in a file in the .\spec\integration\ directory includes itself in the example group applies configured `before(:context)` hooks with `type: :request` metadata tags groups in that directory with `type: :request` - for an example group defined in a file in the .\spec\api\ directory - includes itself in the example group + allows users to override the type + for an example group defined in a file in the ./spec/integration/ directory allows users to override the type applies configured `before(:context)` hooks with `type: :request` metadata + includes itself in the example group tags groups in that directory with `type: :request` - for an example group defined in a file in the .\spec\integration\ directory + for an example group defined in a file in the ./spec/requests/ directory applies configured `before(:context)` hooks with `type: :request` metadata - allows users to override the type tags groups in that directory with `type: :request` + allows users to override the type includes itself in the example group - for an example group defined in a file in the .\spec\requests\ directory + for an example group defined in a file in the .\spec\api\ directory + applies configured `before(:context)` hooks with `type: :request` metadata includes itself in the example group allows users to override the type - applies configured `before(:context)` hooks with `type: :request` metadata tags groups in that directory with `type: :request` for an example group defined in a file in the ./spec/api/ directory tags groups in that directory with `type: :request` - applies configured `before(:context)` hooks with `type: :request` metadata allows users to override the type includes itself in the example group + applies configured `before(:context)` hooks with `type: :request` metadata -have_stream matchers - have_stream_from - raises when no subscription started - passes - fails with message - raises ArgumentError when no subscription passed to expect - with composable matcher - passes - fails with message - with negated form - passes - fails with message - have_streams - does not allow usage - raises when no subscription started - with negated form - fails with message - passes with negated form - raises when no subscription started - raises ArgumentError when no subscription passed to expect - have_stream_for - raises ArgumentError when no subscription passed to expect - raises when no subscription started - passes - fails with message - with negated form - fails with message - passes - -be_new_record - a new record - passes - fails with custom failure message - a persisted record - fails with custom failure message - fails - -ActiveSupport::Relation match_array matcher - verifies that the scope returns the records on the right hand side, regardless of order - fails if the scope encompasses fewer records than on the right hand side - fails if the scope encompasses more records than on the right hand side +RSpec::Rails::ViewExampleGroup + #_controller_path + with a common _default_file_to_render + it returns the directory + with a nested _default_file_to_render + it returns the directory path + automatic inclusion of helpers + operates normally when the view has no path and there is a Helper class defined + includes the namespaced helper with the same name + includes the helper with the same name + operates normally when no helper with the same name exists + application helper exists + includes the application helper + no application helper exists + operates normally + #view + is accessible to configuration-level hooks + delegates to _view + #params + delegates to the controller + #render + given a string + sends string as the first arg to render + given no input + converts the filename without format into render options + converts the filename with variant into render options + converts the filename components into render options + sends render(:template => (described file)) to the view + given a hash + sends the hash as the first arg to render + #template + is deprecated + delegates to #view + #stub_template + prepends an ActionView::FixtureResolver to the view path + caches FixtureResolver instances between examples + caches FixtureResolver instances between example groups + routes helpers collides with asset helpers + uses routes helpers + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :view` + for an example group defined in a file in the ./spec/views/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :view` + for an example group defined in a file in the .\spec\views\ directory + does not include itself in the example group + does not tag groups in that directory with `type: :view` + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :view` + for an example group defined in a file in the .\spec\views\ directory + allows users to override the type + applies configured `before(:context)` hooks with `type: :view` metadata + includes itself in the example group + tags groups in that directory with `type: :view` + for an example group defined in a file in the ./spec/views/ directory + allows users to override the type + includes itself in the example group + tags groups in that directory with `type: :view` + applies configured `before(:context)` hooks with `type: :view` metadata -RSpec::Rails::SystemExampleGroup - #method_name - converts special characters to underscores - handles long method names which include unicode characters - hook order - calls Capybara.reset_sessions (TestUnit after_teardown) after any after hooks +RSpec::Rails::ControllerExampleGroup + handles methods invoked via `method_missing` that use keywords + includes routing matchers + with explicit subject + uses the specified subject instead of the controller + #controller + delegates named route helpers to the underlying controller + calls NamedRouteCollection#route_defined? when it checks that given route is defined or not + with implicit subject + doesn't cause let definition priority to be changed + uses the controller as the subject + in a namespace + controller name + sets the name as 'AnonymousController' if the controller is abstract + sets the name according to the defined controller namespace if it is not anonymous + with inferred anonymous controller + defaults to inferring anonymous controller class + when infer_base_class_for_anonymous_controllers is false + sets the anonymous controller class to ActiveController::Base when no ApplicationController is present + sets the anonymous controller class to ApplicationController + when infer_base_class_for_anonymous_controllers is true + infers the anonymous controller class + infers the anonymous controller class when no ApplicationController is present + #bypass_rescue + overrides the rescue_with_handler method on the controller to raise submitted error behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :system` - for an example group defined in a file in the .\spec\system\ directory + includes itself in example groups tagged with `type: :controller` + for an example group defined in a file in the .\spec\controllers\ directory + does not tag groups in that directory with `type: :controller` does not include itself in the example group - does not tag groups in that directory with `type: :system` - for an example group defined in a file in the ./spec/system/ directory - does not tag groups in that directory with `type: :system` + for an example group defined in a file in the ./spec/controllers/ directory + does not tag groups in that directory with `type: :controller` does not include itself in the example group when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :system` - for an example group defined in a file in the .\spec\system\ directory - tags groups in that directory with `type: :system` + includes itself in example groups tagged with `type: :controller` + for an example group defined in a file in the .\spec\controllers\ directory allows users to override the type - applies configured `before(:context)` hooks with `type: :system` metadata + applies configured `before(:context)` hooks with `type: :controller` metadata includes itself in the example group - for an example group defined in a file in the ./spec/system/ directory - applies configured `before(:context)` hooks with `type: :system` metadata - tags groups in that directory with `type: :system` + tags groups in that directory with `type: :controller` + for an example group defined in a file in the ./spec/controllers/ directory + tags groups in that directory with `type: :controller` includes itself in the example group + applies configured `before(:context)` hooks with `type: :controller` metadata allows users to override the type - #driver - uses :selenium driver by default - calls :driven_by method only once - sets :rack_test driver using by before_action - #after - sets the :extra_failure_lines metadata to an array of STDOUT lines + controller name + sets name as AnonymousController if the controller is abstract + sets name as AnonymousController if defined as ApplicationController + sets name as AnonymousController if it inherits outer group's anonymous controller + sets the name according to defined controller if it is not anonymous + sets the name as AnonymousController if it's anonymous + +have_broadcasted_to matchers + have_broadcasted_to + passes with default messages count (exactly one) + fails when negated and message is sent + reports correct number in fail error message + counts only messages sent in block + passes with at_least count when sent messages are over limit + passes when using symbol target + throws descriptive error when no test adapter set + passes with :thrice count + passes with :twice count + generates failure message with at most hint + generates failure message with at least hint + generates failure message when data not match + passes when negated + passes with at_most count when sent messages are under limit + passes with multiple streams + passes with provided data + fails with with block with incorrect data + raises ArgumentError when no Proc passed to expect + passes with provided data matchers with anything + fails when too many messages broadcast + fails when message is not sent + passes with :once count + passes when using alias + passes with provided data matchers + when object is passed as first argument + when channel can't be inferred + raises exception + when channel is present + passes be_routable provides a description - with should - passes if routes recognize the path - fails if routes do not recognize the path with should_not fails if routes recognize the path passes if routes do not recognize the path - -ActiveRecord support - with partial double verification enabled - allows you to stub `ActiveRecord::Base` - allows you to stub abstract classes - with partial double verification disabled - allows you to stub `ActiveRecord::Base` - allows you to stub abstract classes + with should + fails if routes do not recognize the path + passes if routes recognize the path RSpec::Rails::FixtureFileUploadSupport - with fixture path set in spec - resolves fixture file with fixture path not set resolves fixture using relative path + with fixture path set in spec + resolves fixture file with fixture path set in config - resolves supports `Pathname` objects resolves fixture file + resolves supports `Pathname` objects -RSpec::Rails::FixtureSupport - handles namespaced fixtures - with use_transactional_fixtures set to false - still supports fixture_path/fixture_paths - with use_transactional_tests set to false - does not wrap the test in a transaction - with use_transactional_tests set to true - works with #uses_transaction helper +ActiveSupport::Relation match_array matcher + fails if the scope encompasses more records than on the right hand side + fails if the scope encompasses fewer records than on the right hand side + verifies that the scope returns the records on the right hand side, regardless of order -be_a_new matcher - #with - wrong class and existing record - one attribute value not the same - fails - no attributes same - fails - all attributes same - fails - right class and new record - one attribute same - passes - with composable matchers - one attribute is a composable matcher - fails - passes - matcher is wrong type - fails - two attributes are composable matchers - only one matcher present in actual - fails - both matchers present in actual - passes - one attribute value not the same - fails - no attributes same - fails - all attributes same - passes - existing record - right class - fails - wrong class - fails - new record - right class +RSpec::Rails::HelperExampleGroup::ClassMethods + determine_default_helper_class + the described is a class + returns nil + the described is a module + returns the module + +be_new_record + a persisted record + fails + fails with custom failure message + a new record + fails with custom failure message + passes + +render_template + with should_not + when fails with a redirect + gives informative error message + with a badly formatted error message + falls back to something informative + when fails due to some other exception + raises that exception + when assert_template passes + fails with custom failure message + when assert_template fails passes - wrong class - fails + given a string + delegates to assert_template + given a hash + delegates to assert_template + with should + when assert_template fails + uses failure message from assert_template + when assert_template passes + passes + when fails due to some other exception + raises that exception + given a symbol + converts to_s and delegates to assert_template -RSpec::Rails::RoutingExampleGroup - named routes - delegates them to the route_set +route_to + provides a description + uses failure message from assert_recognizes + delegates to assert_recognizes + with should + when assert_recognizes fails with a routing error + fails with message from assert_recognizes + when an exception is raised + raises that exception + when assert_recognizes fails with an assertion failure + fails with message from assert_recognizes + when assert_recognizes passes + passes + with shortcut syntax + routes with one query parameter + routes with multiple query parameters + routes with extra options + routes with nested query parameters + routes without extra options + with should_not + when an exception is raised + raises that exception + when assert_recognizes fails with an assertion failure + passes + when assert_recognizes passes + fails with custom message + when assert_recognizes fails with a routing error + passes + +RSpec::Rails::SystemExampleGroup + hook order + calls Capybara.reset_sessions (TestUnit after_teardown) after any after hooks + #after + sets the :extra_failure_lines metadata to an array of STDOUT lines behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion - when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :routing` - for an example group defined in a file in the ./spec/routing/ directory - does not tag groups in that directory with `type: :routing` - does not include itself in the example group - for an example group defined in a file in the .\spec\routing\ directory - does not tag groups in that directory with `type: :routing` - does not include itself in the example group when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :routing` - for an example group defined in a file in the .\spec\routing\ directory + includes itself in example groups tagged with `type: :system` + for an example group defined in a file in the ./spec/system/ directory includes itself in the example group + tags groups in that directory with `type: :system` + applies configured `before(:context)` hooks with `type: :system` metadata allows users to override the type - tags groups in that directory with `type: :routing` - applies configured `before(:context)` hooks with `type: :routing` metadata - for an example group defined in a file in the ./spec/routing/ directory - includes itself in the example group + for an example group defined in a file in the .\spec\system\ directory + applies configured `before(:context)` hooks with `type: :system` metadata allows users to override the type - applies configured `before(:context)` hooks with `type: :routing` metadata - tags groups in that directory with `type: :routing` + tags groups in that directory with `type: :system` + includes itself in the example group + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :system` + for an example group defined in a file in the ./spec/system/ directory + does not tag groups in that directory with `type: :system` + does not include itself in the example group + for an example group defined in a file in the .\spec\system\ directory + does not tag groups in that directory with `type: :system` + does not include itself in the example group + #driver + uses :selenium driver by default + sets :rack_test driver using by before_action + calls :driven_by method only once + #method_name + converts special characters to underscores + handles long method names which include unicode characters -have_broadcasted_to matchers - have_broadcasted_to - fails when too many messages broadcast - reports correct number in fail error message - fails when message is not sent - passes with :thrice count - passes with multiple streams - passes with provided data - generates failure message with at most hint - fails when negated and message is sent - passes with :once count - generates failure message when data not match - raises ArgumentError when no Proc passed to expect - fails with with block with incorrect data - passes with default messages count (exactly one) - throws descriptive error when no test adapter set - generates failure message with at least hint - passes with at_most count when sent messages are under limit - passes with at_least count when sent messages are over limit - passes with provided data matchers with anything - counts only messages sent in block - passes with provided data matchers - passes when using alias - passes with :twice count - passes when negated - passes when using symbol target - when object is passed as first argument - when channel is present - passes - when channel can't be inferred - raises exception +should have_xxx + works with ActiveRecord::Associations::CollectionProxy RSpec::Rails::ModelExampleGroup behaves like an rspec-rails example group mixin @@ -3486,130 +3173,185 @@ when `infer_spec_type_from_file_location!` is configured includes itself in example groups tagged with `type: :model` for an example group defined in a file in the .\spec\models\ directory - applies configured `before(:context)` hooks with `type: :model` metadata - includes itself in the example group allows users to override the type + includes itself in the example group + applies configured `before(:context)` hooks with `type: :model` metadata tags groups in that directory with `type: :model` for an example group defined in a file in the ./spec/models/ directory - applies configured `before(:context)` hooks with `type: :model` metadata - includes itself in the example group tags groups in that directory with `type: :model` + includes itself in the example group allows users to override the type + applies configured `before(:context)` hooks with `type: :model` metadata when `infer_spec_type_from_file_location!` is not configured includes itself in example groups tagged with `type: :model` - for an example group defined in a file in the ./spec/models/ directory - does not tag groups in that directory with `type: :model` - does not include itself in the example group for an example group defined in a file in the .\spec\models\ directory + does not include itself in the example group does not tag groups in that directory with `type: :model` + for an example group defined in a file in the ./spec/models/ directory does not include itself in the example group + does not tag groups in that directory with `type: :model` + +RSpec::Rails::FixtureSupport + handles namespaced fixtures + with use_transactional_tests set to true + works with #uses_transaction helper + with use_transactional_tests set to false + does not wrap the test in a transaction + with use_transactional_fixtures set to false + still supports fixture_path/fixture_paths + +have_rendered + with should_not + when fails due to some other exception + raises that exception + when assert_template passes + fails with custom failure message + when assert_template fails + passes + when fails with a redirect + gives informative error message + with a badly formatted error message + falls back to something informative + given a symbol + converts to_s and delegates to assert_template + given a string + delegates to assert_template + with should + when fails due to some other exception + raises that exception + when assert_template fails + uses failure message from assert_template + when assert_template passes + passes + given a hash + delegates to assert_template + +ActiveModel support + with partial double verification enabled + allows you to stub instances of `ActiveModel` + allows you to stub `ActiveModel` + with partial double verification disabled + allows you to stub instances of `ActiveModel` + allows you to stub `ActiveModel` + +ActionMailbox matchers + receive_inbound_email + fails when negated when it receives inbound email + fails when it doesn't receive inbound email + passes when negated when it doesn't receive inbound email + passes when it receives inbound email have_http_status - with general status code group :successful - behaves like status code matcher - has a negated failure message reporting the expected and actual status codes - describes behaves like status code matcher - has a failure message reporting the expected and actual status codes - matching a response - returns false for a response with a different code - returns true for a response with code - behaves like supports different response instances - has a failure message reporting it was given another type - returns false given another type - has a negated failure message reporting it was given another type - given something that acts as a Capybara::Session - returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code - given an ActionDispatch::TestResponse - returns true for a response with the same code - given an ActionDispatch::Response - returns true for a response with the same code + http status :missing + behaves like does not use deprecated methods for Rails 5.2+ + does not use deprecated method for Rails >= 5.2 http status :server_error behaves like supports different response instances returns false given another type - has a failure message reporting it was given another type has a negated failure message reporting it was given another type - given a Rack::MockResponse + has a failure message reporting it was given another type + given an ActionDispatch::TestResponse returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given an ActionDispatch::TestResponse - returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code - http status :error + given a Rack::MockResponse + returns true for a response with the same code + http status :success behaves like does not use deprecated methods for Rails 5.2+ does not use deprecated method for Rails >= 5.2 - http status :successful + http status :not_found behaves like supports different response instances - has a failure message reporting it was given another type has a negated failure message reporting it was given another type + has a failure message reporting it was given another type returns false given another type - given something that acts as a Capybara::Session - returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code - given an ActionDispatch::TestResponse + given something that acts as a Capybara::Session returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - with general status code group :redirect + given an ActionDispatch::TestResponse + returns true for a response with the same code + with general status code group :success behaves like status code matcher has a negated failure message reporting the expected and actual status codes describes behaves like status code matcher has a failure message reporting the expected and actual status codes matching a response - returns true for a response with code returns false for a response with a different code + returns true for a response with code behaves like supports different response instances + has a failure message reporting it was given another type has a negated failure message reporting it was given another type returns false given another type - has a failure message reporting it was given another type - given an ActionDispatch::TestResponse - returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - http status :not_found + given a Rack::MockResponse + returns true for a response with the same code + given an ActionDispatch::TestResponse + returns true for a response with the same code + http status :successful behaves like supports different response instances - has a failure message reporting it was given another type returns false given another type + has a failure message reporting it was given another type has a negated failure message reporting it was given another type + given an ActionDispatch::Response + returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code - given an ActionDispatch::Response - returns true for a response with the same code - with general status code group :server_error - behaves like status code matcher - has a failure message reporting the expected and actual status codes - describes behaves like status code matcher - has a negated failure message reporting the expected and actual status codes - matching a response - returns true for a response with code - returns false for a response with a different code + with a nil status + raises an ArgumentError + with a symbolic status + has a negated failure message reporting the expected status code + has a failure message reporting the expected and actual statuses + raises an ArgumentError + describes responding by the symbolic and associated numeric status code + matching a response + returns false for a response with a different code + returns true for a response with the equivalent code behaves like supports different response instances - returns false given another type - has a negated failure message reporting it was given another type has a failure message reporting it was given another type + has a negated failure message reporting it was given another type + returns false given another type + given an ActionDispatch::TestResponse + returns true for a response with the same code + given a Rack::MockResponse + returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given an ActionDispatch::TestResponse + given something that acts as a Capybara::Session returns true for a response with the same code + with general status code group :error + behaves like supports different response instances + has a negated failure message reporting it was given another type + has a failure message reporting it was given another type + returns false given another type given a Rack::MockResponse returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code + given an ActionDispatch::Response + returns true for a response with the same code + given an ActionDispatch::TestResponse + returns true for a response with the same code + behaves like status code matcher + has a negated failure message reporting the expected and actual status codes + describes behaves like status code matcher + has a failure message reporting the expected and actual status codes + matching a response + returns true for a response with code + returns false for a response with a different code with a numeric status code - has a negated failure message reporting the expected status code has a failure message reporting the expected and actual status codes + has a negated failure message reporting the expected status code describes responding with the numeric status code matching a response returns false for a response with a different code @@ -3618,105 +3360,100 @@ has a failure message reporting it was given another type has a negated failure message reporting it was given another type returns false given another type + given a Rack::MockResponse + returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code - given a Rack::MockResponse - returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code - http status :missing - behaves like does not use deprecated methods for Rails 5.2+ - does not use deprecated method for Rails >= 5.2 - with general status code group :error + with general status code group :not_found behaves like supports different response instances - has a failure message reporting it was given another type has a negated failure message reporting it was given another type + has a failure message reporting it was given another type returns false given another type + given an ActionDispatch::TestResponse + returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code + behaves like status code matcher + has a failure message reporting the expected and actual status codes + has a negated failure message reporting the expected and actual status codes + describes behaves like status code matcher + matching a response + returns false for a response with a different code + returns true for a response with code + with general status code group :redirect + behaves like supports different response instances + has a negated failure message reporting it was given another type + has a failure message reporting it was given another type + returns false given another type given an ActionDispatch::TestResponse returns true for a response with the same code + given a Rack::MockResponse + returns true for a response with the same code + given something that acts as a Capybara::Session + returns true for a response with the same code + given an ActionDispatch::Response + returns true for a response with the same code behaves like status code matcher - has a failure message reporting the expected and actual status codes describes behaves like status code matcher + has a failure message reporting the expected and actual status codes has a negated failure message reporting the expected and actual status codes matching a response returns false for a response with a different code returns true for a response with code - with deprecated rack status codes - supports the original names - http status :success + http status :error behaves like does not use deprecated methods for Rails 5.2+ does not use deprecated method for Rails >= 5.2 - with a nil status - raises an ArgumentError - with general status code group :success + with general status code group :server_error behaves like status code matcher - has a failure message reporting the expected and actual status codes describes behaves like status code matcher + has a failure message reporting the expected and actual status codes has a negated failure message reporting the expected and actual status codes matching a response returns true for a response with code returns false for a response with a different code behaves like supports different response instances - has a negated failure message reporting it was given another type - has a failure message reporting it was given another type returns false given another type - given an ActionDispatch::Response - returns true for a response with the same code + has a failure message reporting it was given another type + has a negated failure message reporting it was given another type given something that acts as a Capybara::Session returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code - given an ActionDispatch::TestResponse - returns true for a response with the same code - with a symbolic status - has a negated failure message reporting the expected status code - has a failure message reporting the expected and actual statuses - describes responding by the symbolic and associated numeric status code - raises an ArgumentError - matching a response - returns true for a response with the equivalent code - returns false for a response with a different code - behaves like supports different response instances - returns false given another type - has a negated failure message reporting it was given another type - has a failure message reporting it was given another type - given a Rack::MockResponse - returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code - given something that acts as a Capybara::Session - returns true for a response with the same code - with general status code group :missing + with deprecated rack status codes + supports the original names + with general status code group :successful behaves like supports different response instances - returns false given another type has a negated failure message reporting it was given another type + returns false given another type has a failure message reporting it was given another type - given an ActionDispatch::TestResponse - returns true for a response with the same code given an ActionDispatch::Response returns true for a response with the same code + given an ActionDispatch::TestResponse + returns true for a response with the same code given something that acts as a Capybara::Session returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code behaves like status code matcher has a failure message reporting the expected and actual status codes - describes behaves like status code matcher has a negated failure message reporting the expected and actual status codes + describes behaves like status code matcher matching a response returns true for a response with code returns false for a response with a different code - with general status code group :not_found + with general status code group :missing behaves like status code matcher has a negated failure message reporting the expected and actual status codes has a failure message reporting the expected and actual status codes @@ -3725,210 +3462,509 @@ returns false for a response with a different code returns true for a response with code behaves like supports different response instances - returns false given another type - has a failure message reporting it was given another type has a negated failure message reporting it was given another type - given an ActionDispatch::Response - returns true for a response with the same code + has a failure message reporting it was given another type + returns false given another type given something that acts as a Capybara::Session returns true for a response with the same code given an ActionDispatch::TestResponse returns true for a response with the same code + given an ActionDispatch::Response + returns true for a response with the same code given a Rack::MockResponse returns true for a response with the same code +RSpec::Rails::ViewRendering + default + ActionController::Metal + renders views + ActionController::Base + does not render views + does not render views in a nested group + when render_views? is false + supports manipulating view paths with arrays + supports manipulating view paths + supports manipulating view paths with resolvers + with empty template resolver + works with strings + works with custom resolvers + #render_views + propagates to examples in nested groups properly + with true + tells examples to render views + with false + tells examples not to render views + overrides the global config if render_views is enabled there + with no args + tells examples to render views + in a nested group + overrides the value inherited from the parent group + passes override to children + leaves the parent group as/is + with no args + tells examples to render views + with false + tells examples not to render views + with true + tells examples to render views + +be_a_new matcher + existing record + right class + fails + wrong class + fails + new record + right class + passes + wrong class + fails + #with + wrong class and existing record + no attributes same + fails + all attributes same + fails + one attribute value not the same + fails + right class and new record + one attribute value not the same + fails + one attribute same + passes + with composable matchers + one attribute is a composable matcher + fails + passes + matcher is wrong type + fails + two attributes are composable matchers + only one matcher present in actual + fails + both matchers present in actual + passes + all attributes same + passes + no attributes same + fails + +RSpec::Rails::AssertionDelegator + provides a module that delegates assertion methods to an isolated class + does not delegate method_missing + delegates back to the including instance for methods the assertion module requires + +ActiveRecord support + with partial double verification disabled + allows you to stub `ActiveRecord::Base` + allows you to stub abstract classes + with partial double verification enabled + allows you to stub `ActiveRecord::Base` + allows you to stub abstract classes + +RSpec::Rails::MinitestAssertionAdapter + exposes assert_output to host examples + exposes assert_instance_of to host examples + exposes refute_path_exists to host examples + exposes assert_in_delta to host examples + exposes assert_match to host examples + does not expose internal methods of Minitest + exposes assert_silent to host examples + exposes assert_same to host examples + exposes refute_in_epsilon to host examples + exposes refute_respond_to to host examples + exposes refute_nil to host examples + exposes assert_equal to host examples + exposes refute_predicate to host examples + exposes refute_equal to host examples + exposes refute_includes to host examples + exposes assert_predicate to host examples + exposes refute_pattern to host examples + exposes refute_empty to host examples + does not leak TestUnit specific methods into the AssertionDelegator + exposes refute_in_delta to host examples + exposes flunk to host examples + exposes refute to host examples + exposes refute_match to host examples + exposes refute_same to host examples + exposes assert_nil to host examples + exposes assert_respond_to to host examples + exposes assert_empty to host examples + exposes assert_in_epsilon to host examples + does not expose Minitest's message method + exposes assert_pattern to host examples + exposes assert_raises to host examples + exposes assert to host examples + exposes refute_kind_of to host examples + exposes refute_operator to host examples + exposes assert_operator to host examples + exposes assert_kind_of to host examples + exposes assert_throws to host examples + exposes refute_instance_of to host examples + exposes assert_path_exists to host examples + exposes assert_includes to host examples + exposes assert_send to host examples + +RSpec::Rails + has no malformed whitespace + +RSpec::Rails::FeatureExampleGroup + includes Rails route helpers + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :feature` + for an example group defined in a file in the .\spec\features\ directory + does not include itself in the example group + does not tag groups in that directory with `type: :feature` + for an example group defined in a file in the ./spec/features/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :feature` + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :feature` + for an example group defined in a file in the ./spec/features/ directory + applies configured `before(:context)` hooks with `type: :feature` metadata + allows users to override the type + tags groups in that directory with `type: :feature` + includes itself in the example group + for an example group defined in a file in the .\spec\features\ directory + tags groups in that directory with `type: :feature` + allows users to override the type + includes itself in the example group + applies configured `before(:context)` hooks with `type: :feature` metadata + #visit + raises an error informing about missing Capybara + is resistant to load order errors + when nested inside a request example group + includes Rails route helpers + +have_stream matchers + have_stream_from + fails with message + raises ArgumentError when no subscription passed to expect + passes + raises when no subscription started + with composable matcher + fails with message + passes + with negated form + fails with message + passes + have_stream_for + raises ArgumentError when no subscription passed to expect + fails with message + passes + raises when no subscription started + with negated form + fails with message + passes + have_streams + raises when no subscription started + does not allow usage + with negated form + fails with message + raises when no subscription started + raises ArgumentError when no subscription passed to expect + passes with negated form + HaveEnqueuedMail matchers have_enqueued_mail - passes when given 0 arguments - generates a failure message with at - passes with multiple emails - passes with at_least when enqueued emails are over the limit - accepts composable matchers as an at date - passes for mailer methods with default arguments + passes when deliver_later is called with a wait_until argument + passes when only given mailer argument + passes when negated with 0 arguments + ensure that the right mailer is enqueued + passes when deliver_later is called with a queue argument generates a failure message with on_queue - generates a failure message with unmatching enqueued mail jobs passes when using the enqueue_email alias + passes with :once count + passes for mailer methods that accept arguments when the provided argument matcher is not used + passes with multiple emails + generates a failure message with at + passes for mailer methods with default arguments + passes multiple arguments to with block + fails with with block with incorrect data generates a failure message with arguments - passes when negated - fails when too many emails are enqueued - generates a failure message when given 0 argument - passes with at_most when enqueued emails are under the limit - passes when negated with 0 arguments - counts only emails enqueued in the block - throws descriptive error when no test adapter set + accepts composable matchers as an at date passes when a mailer method is called with deliver_later - passes multiple arguments to with block passes when negated with only mailer arguments - passes when deliver_later is called with a wait_until argument - passes when only given mailer argument - generates a failure message - passes when deliver_later is called with a queue argument generates a failure message with at least hint - passes with :once count - passes when using the have_enqueued_email alias generates a failure message with at most hint - generates a failure message when given only mailer argument - passes for mailer methods that accept arguments when the provided argument matcher is not used - fails with with block with incorrect data - passes with provided argument matchers - ensure that the right mailer is enqueued - passes with :twice count - fails when negated and mail is enqueued - passes with :thrice count passes when using the enqueue_mail alias + counts only emails enqueued in the block + generates a failure message with unmatching enqueued mail jobs + passes when using the have_enqueued_email alias only calls with block if other conditions are met + passes with :thrice count + passes with at_least when enqueued emails are over the limit + passes with provided argument matchers + fails when too many emails are enqueued + throws descriptive error when no test adapter set + generates a failure message when given 0 argument + passes with at_most when enqueued emails are under the limit + generates a failure message matches based on mailer class and method name + passes when given 0 arguments + passes when negated + generates a failure message when given only mailer argument + fails when negated and mail is enqueued + passes with :twice count when parameterized passes with provided argument matchers - passes when mailer is parameterized passes when mixing parameterized and non-parameterized emails - mailer job is unified - matches arguments when mailer has only args passes when mailer is parameterized + mailer job is unified passes when mixing parameterized and non-parameterized emails - passes when given a global id serialized argument - passes when using a mailer with `delivery_job` set to a sub class of `ActionMailer::DeliveryJob` + passes when mailer is parameterized + matches arguments when mailer has only args passes with provided argument matchers + passes when using a mailer with `delivery_job` set to a sub class of `ActionMailer::DeliveryJob` + passes when given a global id serialized argument -RSpec::Rails::SetupAndTeardownAdapter - .setup - registers before hooks in the order setup is received - registers teardown hooks in the order setup is received - registers prepend_before hooks for the Rails' setup methods +RSpec::Rails::MailboxExampleGroup + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :mailbox` + for an example group defined in a file in the ./spec/mailboxes/ directory + allows users to override the type + includes itself in the example group + tags groups in that directory with `type: :mailbox` + applies configured `before(:context)` hooks with `type: :mailbox` metadata + for an example group defined in a file in the .\spec\mailboxes\ directory + tags groups in that directory with `type: :mailbox` + allows users to override the type + includes itself in the example group + applies configured `before(:context)` hooks with `type: :mailbox` metadata + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :mailbox` + for an example group defined in a file in the ./spec/mailboxes/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :mailbox` + for an example group defined in a file in the .\spec\mailboxes\ directory + does not include itself in the example group + does not tag groups in that directory with `type: :mailbox` + #process + sends mail to the mailbox + #have_bounced + raises on unbounced mail + does not raise otherwise + #have_failed + does not raise otherwise + raises on unfailed mail + #have_been_delivered + does not raise otherwise + raises on undelivered mail -RSpec::Rails::ControllerExampleGroup - handles methods invoked via `method_missing` that use keywords - includes routing matchers - #controller - calls NamedRouteCollection#route_defined? when it checks that given route is defined or not - delegates named route helpers to the underlying controller - controller name - sets name as AnonymousController if it inherits outer group's anonymous controller - sets name as AnonymousController if the controller is abstract - sets the name according to defined controller if it is not anonymous - sets the name as AnonymousController if it's anonymous - sets name as AnonymousController if defined as ApplicationController - in a namespace - controller name - sets the name according to the defined controller namespace if it is not anonymous - sets the name as 'AnonymousController' if the controller is abstract - with explicit subject - uses the specified subject instead of the controller +RSpec::Rails::ChannelExampleGroup behaves like an rspec-rails example group mixin adds does not add `:type` metadata on inclusion when `infer_spec_type_from_file_location!` is configured - includes itself in example groups tagged with `type: :controller` - for an example group defined in a file in the ./spec/controllers/ directory + includes itself in example groups tagged with `type: :channel` + for an example group defined in a file in the ./spec/channels/ directory + tags groups in that directory with `type: :channel` + applies configured `before(:context)` hooks with `type: :channel` metadata includes itself in the example group allows users to override the type - applies configured `before(:context)` hooks with `type: :controller` metadata - tags groups in that directory with `type: :controller` - for an example group defined in a file in the .\spec\controllers\ directory + for an example group defined in a file in the .\spec\channels\ directory + tags groups in that directory with `type: :channel` allows users to override the type - applies configured `before(:context)` hooks with `type: :controller` metadata includes itself in the example group - tags groups in that directory with `type: :controller` + applies configured `before(:context)` hooks with `type: :channel` metadata when `infer_spec_type_from_file_location!` is not configured - includes itself in example groups tagged with `type: :controller` - for an example group defined in a file in the .\spec\controllers\ directory + includes itself in example groups tagged with `type: :channel` + for an example group defined in a file in the ./spec/channels/ directory does not include itself in the example group - does not tag groups in that directory with `type: :controller` - for an example group defined in a file in the ./spec/controllers/ directory - does not tag groups in that directory with `type: :controller` + does not tag groups in that directory with `type: :channel` + for an example group defined in a file in the .\spec\channels\ directory + does not tag groups in that directory with `type: :channel` does not include itself in the example group - with inferred anonymous controller - defaults to inferring anonymous controller class - when infer_base_class_for_anonymous_controllers is true - infers the anonymous controller class - infers the anonymous controller class when no ApplicationController is present - when infer_base_class_for_anonymous_controllers is false - sets the anonymous controller class to ApplicationController - sets the anonymous controller class to ActiveController::Base when no ApplicationController is present - with implicit subject - doesn't cause let definition priority to be changed - uses the controller as the subject - #bypass_rescue - overrides the rescue_with_handler method on the controller to raise submitted error -RSpec::Rails::MinitestAssertionAdapter - exposes assert_path_exists to host examples - does not expose internal methods of Minitest - exposes refute_respond_to to host examples - does not expose Minitest's message method - exposes assert_throws to host examples - exposes assert_same to host examples - exposes assert_silent to host examples - exposes refute to host examples - exposes assert_match to host examples - exposes refute_nil to host examples - exposes refute_operator to host examples - exposes assert_nil to host examples - exposes assert_operator to host examples - exposes refute_predicate to host examples - exposes assert_send to host examples - exposes refute_kind_of to host examples - exposes assert_predicate to host examples - exposes assert_kind_of to host examples - exposes assert to host examples - exposes refute_match to host examples - exposes assert_empty to host examples - exposes refute_in_delta to host examples - exposes refute_in_epsilon to host examples - exposes assert_in_epsilon to host examples - does not leak TestUnit specific methods into the AssertionDelegator - exposes refute_instance_of to host examples - exposes refute_empty to host examples - exposes assert_instance_of to host examples - exposes assert_includes to host examples - exposes assert_raises to host examples - exposes assert_in_delta to host examples - exposes refute_pattern to host examples - exposes refute_equal to host examples - exposes assert_output to host examples - exposes refute_includes to host examples - exposes flunk to host examples - exposes refute_path_exists to host examples - exposes assert_respond_to to host examples - exposes assert_pattern to host examples - exposes refute_same to host examples - exposes assert_equal to host examples - -ActionMailbox matchers - receive_inbound_email - fails when negated when it receives inbound email - passes when it receives inbound email - passes when negated when it doesn't receive inbound email - fails when it doesn't receive inbound email - -route_to - delegates to assert_recognizes - uses failure message from assert_recognizes - provides a description - with shortcut syntax - routes with multiple query parameters - routes with extra options - routes with one query parameter - routes without extra options - routes with nested query parameters +redirect_to with should - when assert_recognizes passes - passes - when an exception is raised + when fails due to some other exception raises that exception - when assert_recognizes fails with an assertion failure - fails with message from assert_recognizes - when assert_recognizes fails with a routing error - fails with message from assert_recognizes - with should_not - when assert_recognizes fails with an assertion failure + when assert_redirected_to fails + uses failure message from assert_redirected_to + when assert_redirected_to passes passes - when an exception is raised + with should_not + when assert_redirected_to passes + fails with custom failure message + when fails due to some other exception raises that exception - when assert_recognizes passes - fails with custom message - when assert_recognizes fails with a routing error + when assert_redirected_to fails passes +RSpec::Rails::RoutingExampleGroup + named routes + delegates them to the route_set + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :routing` + for an example group defined in a file in the ./spec/routing/ directory + does not include itself in the example group + does not tag groups in that directory with `type: :routing` + for an example group defined in a file in the .\spec\routing\ directory + does not tag groups in that directory with `type: :routing` + does not include itself in the example group + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :routing` + for an example group defined in a file in the .\spec\routing\ directory + includes itself in the example group + tags groups in that directory with `type: :routing` + allows users to override the type + applies configured `before(:context)` hooks with `type: :routing` metadata + for an example group defined in a file in the ./spec/routing/ directory + allows users to override the type + includes itself in the example group + applies configured `before(:context)` hooks with `type: :routing` metadata + tags groups in that directory with `type: :routing` + +be_valid matcher + includes the error messages for simple implementations of error messages + uses a custom failure message if provided + includes a brief error message when error message is wrong arity + includes a failure message for the negative case + does not include the validation context if not provided + includes the error messages in the failure message + includes a brief error message for the simplest implementation of validity + includes the validation context if provided + +RSpec::Rails::ViewSpecMethods + .add_extra_params_accessors_to + when accessors are already defined + does not redefine them + when accessors are not yet defined + adds them as instance methods + the added #extra_params reader + raises an error when a user tries to mutate it + .remove_extra_params_accessors_from + when accessors are defined + removes them + when accessors are not defined + does nothing + +ActiveJob matchers + have_enqueued_job + raises ArgumentError when no Proc passed to expect + warns when time offsets are inprecise + only calls with block if other conditions are met + passes when negated + has an enqueued job when providing at and there is no wait + passes with at_most count when enqueued jobs are under limit + passes with ActiveSupport::TimeWithZone + passes with at_least count when enqueued jobs are over limit + passes with provided at time + ignores undeserializable arguments + fails when negated and several jobs enqueued + passes with provided arguments + does not have an enqueued job when providing at of :no_wait and there is a wait + passes with job name + passes with provided arguments containing global id object + generates failure message with at most hint + passes with default jobs count (exactly one) + fails with with block with incorrect data + passes deserialized arguments to with block + passes multiple arguments to with block + has an enqueued job when not providing at and there is a wait + passes when using alias + passes with provided queue name as symbol + generates failure message with at least hint + fails when job is not enqueued + passes with multiple jobs + passes with :twice count + fails when too many jobs enqueued + fails when negated and job is enqueued + passes with :once count + counts only jobs enqueued in block + passes with Time + has an enqueued job when providing at of :no_wait and there is no wait + accepts composable matchers as an at date + passes with provided argument matchers + passes with provided at date + passes with provided queue name as string + throws descriptive error when no test adapter set + generates failure message with all provided options + passes with :thrice count + works with time offsets + reports correct number in fail error message + when job is retried + passes with reenqueued job + when previously enqueued jobs were performed + counts newly enqueued jobs + have_been_enqueued + passes with default jobs count (exactly one) + fails when job is not enqueued + passes when negated + fails when negated and several jobs enqueued + counts all enqueued jobs + accepts composable matchers as an at date + have_been_performed + passes with default jobs count (exactly one) + fails when job is not performed + passes when negated + counts all performed jobs + have_performed_job + passes when negated + fails when too many jobs performed + passes with :thrice count + reports correct number in fail error message + fails with with block with incorrect data + counts only jobs performed in block + passes with provided arguments + passes with provided argument matchers + passes with :twice count + throws descriptive error when no test adapter set + passes with multiple jobs + passes with :once count + passes multiple arguments to with block + raises ArgumentError when no Proc passed to expect + only calls with block if other conditions are met + generates failure message with at least hint + generates failure message with all provided options + passes with provided arguments containing global id object + passes deserialized arguments to with block + passes with provided queue name as symbol + passes with job name + generates failure message with at most hint + passes with provided queue name as string + fails when negated and job is performed + passes with provided at date + passes with at_most count when performed jobs are under limit + passes with at_least count when performed jobs are over limit + passes with default jobs count (exactly one) + fails when job is not performed + Active Job test helpers + does not raise that "assert_nothing_raised" is undefined + +RSpec::Rails::MinitestLifecycleAdapter + allows let variables named 'send' + invokes minitest lifecycle hooks at the appropriate times + +RSpec::Rails::JobExampleGroup + behaves like an rspec-rails example group mixin + adds does not add `:type` metadata on inclusion + when `infer_spec_type_from_file_location!` is configured + includes itself in example groups tagged with `type: :job` + for an example group defined in a file in the ./spec/jobs/ directory + allows users to override the type + tags groups in that directory with `type: :job` + applies configured `before(:context)` hooks with `type: :job` metadata + includes itself in the example group + for an example group defined in a file in the .\spec\jobs\ directory + tags groups in that directory with `type: :job` + includes itself in the example group + allows users to override the type + applies configured `before(:context)` hooks with `type: :job` metadata + when `infer_spec_type_from_file_location!` is not configured + includes itself in example groups tagged with `type: :job` + for an example group defined in a file in the ./spec/jobs/ directory + does not tag groups in that directory with `type: :job` + does not include itself in the example group + for an example group defined in a file in the .\spec\jobs\ directory + does not include itself in the example group + does not tag groups in that directory with `type: :job` + Pending: (Failures listed here are expected and do not affect your suite's status) 1) Configuration clears ActionMailer::Base::Deliveries after each example only has deliveries from this test (e.g. from email@example.com) @@ -3939,10 +3975,10 @@ # Temporarily skipped with xit # ./spec/rspec/rails/configuration_spec.rb:378 -Finished in 6.49 seconds (files took 5.02 seconds to load) +Finished in 3.45 seconds (files took 2.58 seconds to load) 818 examples, 0 failures, 2 pending -Randomized with seed 1884 +Randomized with seed 44056 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -3976,12 +4012,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/2510551/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/2827823 and its subdirectories -I: Current time: Wed Feb 12 02:23:45 -12 2025 -I: pbuilder-time-stamp: 1739370225 +I: removing directory /srv/workspace/pbuilder/2510551 and its subdirectories +I: Current time: Wed Mar 18 10:47:56 +14 2026 +I: pbuilder-time-stamp: 1773780476