Diff of the two buildlogs: -- --- b1/build.log 2021-08-12 10:52:11.316342958 +0000 +++ b2/build.log 2021-08-12 10:54:25.827298416 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Wed Aug 11 22:50:04 -12 2021 -I: pbuilder-time-stamp: 1628765404 +I: Current time: Fri Aug 13 00:52:19 +14 2021 +I: pbuilder-time-stamp: 1628765539 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bullseye-reproducible-base.tgz] I: copying local configuration @@ -16,8 +16,8 @@ I: copying [./ruby-rubocop-rspec_1.42.0-1.debian.tar.xz] I: Extracting source gpgv: unknown type of key resource 'trustedkeys.kbx' -gpgv: keyblock resource '/tmp/dpkg-verify-sig.5bLWnWO1/trustedkeys.kbx': General error -gpgv: Signature made Fri Jul 24 06:26:59 2020 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.tHvqnKjv/trustedkeys.kbx': General error +gpgv: Signature made Sat Jul 25 08:26:59 2020 +14 gpgv: using RSA key 6C9D10484A9AE4CC385F7C71823E967606C34B96 gpgv: issuer "utkarsh@debian.org" gpgv: Can't check signature: No public key @@ -29,135 +29,169 @@ dpkg-source: info: applying 01-disable-bundler.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/15497/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/2226/tmp/hooks/D01_modify_environment starting +debug: Running on jtx1c. +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 +Removing 'diversion of /bin/sh to /bin/sh.distrib by dash' +Adding 'diversion of /bin/sh to /bin/sh.distrib by bash' +Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' +Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by 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/2226/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/2226/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=3' - DISTRIBUTION='' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="1" [2]="4" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.1.4(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=4' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='aad73dc2dbbc485f8098ba46e83a0f3b' - 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='15497' - PS1='# ' - PS2='> ' + INVOCATION_ID=b5778278a3a84fea947f602d9a2b4e98 + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + 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=2226 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/tmp.93H3A5cRCJ/pbuilderrc_PIUZ --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.93H3A5cRCJ/b1 --logfile b1/build.log ruby-rubocop-rspec_1.42.0-1.dsc' - SUDO_GID='112' - SUDO_UID='106' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:8000/' + 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/tmp.93H3A5cRCJ/pbuilderrc_Svgb --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.93H3A5cRCJ/b2 --logfile b2/build.log --extrapackages usrmerge ruby-rubocop-rspec_1.42.0-1.dsc' + SUDO_GID=114 + SUDO_UID=108 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:8000/ I: uname -a - Linux virt32b 5.10.0-8-armmp-lpae #1 SMP Debian 5.10.46-4 (2021-08-03) armv7l GNU/Linux + Linux i-capture-the-hostname 5.10.0-8-arm64 #1 SMP Debian 5.10.46-4 (2021-08-03) aarch64 GNU/Linux I: ls -l /bin total 3580 - -rwxr-xr-x 1 root root 816764 Aug 4 08:25 bash - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzcat - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Jul 20 2020 bzdiff - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4877 Sep 4 2019 bzexe - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Jul 20 2020 bzgrep - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 9636 Jul 20 2020 bzip2recover - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Jul 20 2020 bzmore - -rwxr-xr-x 1 root root 26668 Sep 22 2020 cat - -rwxr-xr-x 1 root root 43104 Sep 22 2020 chgrp - -rwxr-xr-x 1 root root 38984 Sep 22 2020 chmod - -rwxr-xr-x 1 root root 43112 Sep 22 2020 chown - -rwxr-xr-x 1 root root 92616 Sep 22 2020 cp - -rwxr-xr-x 1 root root 75524 Dec 10 2020 dash - -rwxr-xr-x 1 root root 75880 Sep 22 2020 date - -rwxr-xr-x 1 root root 55436 Sep 22 2020 dd - -rwxr-xr-x 1 root root 59912 Sep 22 2020 df - -rwxr-xr-x 1 root root 96764 Sep 22 2020 dir - -rwxr-xr-x 1 root root 55012 Jul 28 07:09 dmesg - lrwxrwxrwx 1 root root 8 Nov 6 2019 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Nov 6 2019 domainname -> hostname - -rwxr-xr-x 1 root root 22508 Sep 22 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 22496 Sep 22 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 47492 Jul 28 07:09 findmnt - -rwsr-xr-x 1 root root 26076 Feb 26 04:12 fusermount - -rwxr-xr-x 1 root root 124508 Nov 9 2020 grep - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 gunzip - -rwxr-xr-x 1 root root 6376 Mar 2 11:30 gzexe - -rwxr-xr-x 1 root root 64212 Mar 2 11:30 gzip - -rwxr-xr-x 1 root root 13784 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 43180 Sep 22 2020 ln - -rwxr-xr-x 1 root root 35068 Feb 7 2020 login - -rwxr-xr-x 1 root root 96764 Sep 22 2020 ls - -rwxr-xr-x 1 root root 99940 Jul 28 07:09 lsblk - -rwxr-xr-x 1 root root 51408 Sep 22 2020 mkdir - -rwxr-xr-x 1 root root 43184 Sep 22 2020 mknod - -rwxr-xr-x 1 root root 30780 Sep 22 2020 mktemp - -rwxr-xr-x 1 root root 34408 Jul 28 07:09 more - -rwsr-xr-x 1 root root 34400 Jul 28 07:09 mount - -rwxr-xr-x 1 root root 9824 Jul 28 07:09 mountpoint - -rwxr-xr-x 1 root root 88524 Sep 22 2020 mv - lrwxrwxrwx 1 root root 8 Nov 6 2019 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 18 03:38 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 26652 Sep 22 2020 pwd - lrwxrwxrwx 1 root root 4 Aug 4 08:25 rbash -> bash - -rwxr-xr-x 1 root root 30740 Sep 22 2020 readlink - -rwxr-xr-x 1 root root 43104 Sep 22 2020 rm - -rwxr-xr-x 1 root root 30732 Sep 22 2020 rmdir - -rwxr-xr-x 1 root root 14144 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 76012 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Aug 10 21:26 sh -> dash - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sleep - -rwxr-xr-x 1 root root 55360 Sep 22 2020 stty - -rwsr-xr-x 1 root root 46704 Jul 28 07:09 su - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sync - -rwxr-xr-x 1 root root 340872 Feb 16 21:55 tar - -rwxr-xr-x 1 root root 9808 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 67696 Sep 22 2020 touch - -rwxr-xr-x 1 root root 22496 Sep 22 2020 true - -rwxr-xr-x 1 root root 9636 Feb 26 04:12 ulockmgr_server - -rwsr-xr-x 1 root root 22108 Jul 28 07:09 umount - -rwxr-xr-x 1 root root 22520 Sep 22 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 uncompress - -rwxr-xr-x 1 root root 96764 Sep 22 2020 vdir - -rwxr-xr-x 1 root root 38512 Jul 28 07:09 wdctl - lrwxrwxrwx 1 root root 8 Nov 6 2019 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Mar 2 11:30 zcat - -rwxr-xr-x 1 root root 1678 Mar 2 11:30 zcmp - -rwxr-xr-x 1 root root 5880 Mar 2 11:30 zdiff - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zegrep - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zfgrep - -rwxr-xr-x 1 root root 2081 Mar 2 11:30 zforce - -rwxr-xr-x 1 root root 7585 Mar 2 11:30 zgrep - -rwxr-xr-x 1 root root 2206 Mar 2 11:30 zless - -rwxr-xr-x 1 root root 1842 Mar 2 11:30 zmore - -rwxr-xr-x 1 root root 4553 Mar 2 11:30 znew -I: user script /srv/workspace/pbuilder/15497/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 816764 Aug 5 10:25 bash + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bzcat + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Jul 21 2020 bzdiff + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4877 Sep 5 2019 bzexe + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Jul 21 2020 bzgrep + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 9636 Jul 21 2020 bzip2recover + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Jul 21 2020 bzmore + -rwxr-xr-x 1 root root 26668 Sep 23 2020 cat + -rwxr-xr-x 1 root root 43104 Sep 23 2020 chgrp + -rwxr-xr-x 1 root root 38984 Sep 23 2020 chmod + -rwxr-xr-x 1 root root 43112 Sep 23 2020 chown + -rwxr-xr-x 1 root root 92616 Sep 23 2020 cp + -rwxr-xr-x 1 root root 75524 Dec 11 2020 dash + -rwxr-xr-x 1 root root 75880 Sep 23 2020 date + -rwxr-xr-x 1 root root 55436 Sep 23 2020 dd + -rwxr-xr-x 1 root root 59912 Sep 23 2020 df + -rwxr-xr-x 1 root root 96764 Sep 23 2020 dir + -rwxr-xr-x 1 root root 55012 Jul 29 09:09 dmesg + lrwxrwxrwx 1 root root 8 Nov 8 2019 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Nov 8 2019 domainname -> hostname + -rwxr-xr-x 1 root root 22508 Sep 23 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 22496 Sep 23 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 47492 Jul 29 09:09 findmnt + -rwsr-xr-x 1 root root 26076 Feb 27 06:12 fusermount + -rwxr-xr-x 1 root root 124508 Nov 10 2020 grep + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 gunzip + -rwxr-xr-x 1 root root 6376 Mar 3 13:30 gzexe + -rwxr-xr-x 1 root root 64212 Mar 3 13:30 gzip + -rwxr-xr-x 1 root root 13784 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 43180 Sep 23 2020 ln + -rwxr-xr-x 1 root root 35068 Feb 8 2020 login + -rwxr-xr-x 1 root root 96764 Sep 23 2020 ls + -rwxr-xr-x 1 root root 99940 Jul 29 09:09 lsblk + -rwxr-xr-x 1 root root 51408 Sep 23 2020 mkdir + -rwxr-xr-x 1 root root 43184 Sep 23 2020 mknod + -rwxr-xr-x 1 root root 30780 Sep 23 2020 mktemp + -rwxr-xr-x 1 root root 34408 Jul 29 09:09 more + -rwsr-xr-x 1 root root 34400 Jul 29 09:09 mount + -rwxr-xr-x 1 root root 9824 Jul 29 09:09 mountpoint + -rwxr-xr-x 1 root root 88524 Sep 23 2020 mv + lrwxrwxrwx 1 root root 8 Nov 8 2019 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 19 05:38 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 26652 Sep 23 2020 pwd + lrwxrwxrwx 1 root root 4 Aug 5 10:25 rbash -> bash + -rwxr-xr-x 1 root root 30740 Sep 23 2020 readlink + -rwxr-xr-x 1 root root 43104 Sep 23 2020 rm + -rwxr-xr-x 1 root root 30732 Sep 23 2020 rmdir + -rwxr-xr-x 1 root root 14144 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 76012 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Aug 13 00:52 sh -> bash + lrwxrwxrwx 1 root root 4 Aug 12 23:26 sh.distrib -> dash + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sleep + -rwxr-xr-x 1 root root 55360 Sep 23 2020 stty + -rwsr-xr-x 1 root root 46704 Jul 29 09:09 su + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sync + -rwxr-xr-x 1 root root 340872 Feb 17 23:55 tar + -rwxr-xr-x 1 root root 9808 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 67696 Sep 23 2020 touch + -rwxr-xr-x 1 root root 22496 Sep 23 2020 true + -rwxr-xr-x 1 root root 9636 Feb 27 06:12 ulockmgr_server + -rwsr-xr-x 1 root root 22108 Jul 29 09:09 umount + -rwxr-xr-x 1 root root 22520 Sep 23 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 uncompress + -rwxr-xr-x 1 root root 96764 Sep 23 2020 vdir + -rwxr-xr-x 1 root root 38512 Jul 29 09:09 wdctl + lrwxrwxrwx 1 root root 8 Nov 8 2019 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Mar 3 13:30 zcat + -rwxr-xr-x 1 root root 1678 Mar 3 13:30 zcmp + -rwxr-xr-x 1 root root 5880 Mar 3 13:30 zdiff + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zegrep + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zfgrep + -rwxr-xr-x 1 root root 2081 Mar 3 13:30 zforce + -rwxr-xr-x 1 root root 7585 Mar 3 13:30 zgrep + -rwxr-xr-x 1 root root 2206 Mar 3 13:30 zless + -rwxr-xr-x 1 root root 1842 Mar 3 13:30 zmore + -rwxr-xr-x 1 root root 4553 Mar 3 13:30 znew +I: user script /srv/workspace/pbuilder/2226/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -351,7 +385,7 @@ Get: 144 http://deb.debian.org/debian bullseye/main armhf ruby-rspec-mocks all 3.9.0c2e2m1s3-2 [81.4 kB] Get: 145 http://deb.debian.org/debian bullseye/main armhf ruby-rspec all 3.9.0c2e2m1s3-2 [8348 B] Get: 146 http://deb.debian.org/debian bullseye/main armhf yard all 0.9.24-1 [387 kB] -Fetched 44.4 MB in 6s (7264 kB/s) +Fetched 44.4 MB in 6s (7444 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package bsdextrautils. (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 ... 19398 files and directories currently installed.) @@ -959,8 +993,45 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +The following additional packages will be installed: + libfile-find-rule-perl libnumber-compare-perl libtext-glob-perl +The following NEW packages will be installed: + libfile-find-rule-perl libnumber-compare-perl libtext-glob-perl usrmerge +0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. +Need to get 59.5 kB of archives. +After this operation, 157 kB of additional disk space will be used. +Get:1 http://deb.debian.org/debian bullseye/main armhf libnumber-compare-perl all 0.03-1.1 [6956 B] +Get:2 http://deb.debian.org/debian bullseye/main armhf libtext-glob-perl all 0.11-1 [8888 B] +Get:3 http://deb.debian.org/debian bullseye/main armhf libfile-find-rule-perl all 0.34-1 [30.6 kB] +Get:4 http://deb.debian.org/debian bullseye/main armhf usrmerge all 25 [13.0 kB] +debconf: delaying package configuration, since apt-utils is not installed +Fetched 59.5 kB in 0s (1147 kB/s) +Selecting previously unselected package libnumber-compare-perl. +(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 ... 29660 files and directories currently installed.) +Preparing to unpack .../libnumber-compare-perl_0.03-1.1_all.deb ... +Unpacking libnumber-compare-perl (0.03-1.1) ... +Selecting previously unselected package libtext-glob-perl. +Preparing to unpack .../libtext-glob-perl_0.11-1_all.deb ... +Unpacking libtext-glob-perl (0.11-1) ... +Selecting previously unselected package libfile-find-rule-perl. +Preparing to unpack .../libfile-find-rule-perl_0.34-1_all.deb ... +Unpacking libfile-find-rule-perl (0.34-1) ... +Selecting previously unselected package usrmerge. +Preparing to unpack .../archives/usrmerge_25_all.deb ... +Unpacking usrmerge (25) ... +Setting up libtext-glob-perl (0.11-1) ... +Setting up libnumber-compare-perl (0.03-1.1) ... +Setting up libfile-find-rule-perl (0.34-1) ... +Setting up usrmerge (25) ... +The system has been successfully converted. +Processing triggers for man-db (2.9.4-2) ... +Not building database; man-db/auto-update is not 'true'. I: Building the package -I: Running cd /build/ruby-rubocop-rspec-1.42.0/ && 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-rubocop-rspec_1.42.0-1_source.changes +hostname: Name or service not known +I: Running cd /build/ruby-rubocop-rspec-1.42.0/ && 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-rubocop-rspec_1.42.0-1_source.changes dpkg-buildpackage: info: source package ruby-rubocop-rspec dpkg-buildpackage: info: source version 1.42.0-1 dpkg-buildpackage: info: source distribution unstable @@ -991,7 +1062,7 @@ dh_auto_install -O--buildsystem=ruby dh_ruby --install /build/ruby-rubocop-rspec-1.42.0/debian/ruby-rubocop-rspec dh_ruby --install -/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20210811-20983-1o9psjr/gemspec +/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20210813-7895-tem0a2/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on rubocop (>= 0.87.0) is not recommended if rubocop is semantically versioned, use: @@ -1010,7 +1081,7 @@ Name: rubocop-rspec Version: 1.42.0 File: rubocop-rspec-1.42.0.gem -/usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rubocop-rspec/usr/share/rubygems-integration/all /tmp/d20210811-20983-1o9psjr/rubocop-rspec-1.42.0.gem +/usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rubocop-rspec/usr/share/rubygems-integration/all /tmp/d20210813-7895-tem0a2/rubocop-rspec-1.42.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/ruby-rubocop-rspec-1.42.0/debian/ruby-rubocop-rspec/usr/share/rubygems-integration/all/gems/rubocop-rspec-1.42.0/config/default.yml /build/ruby-rubocop-rspec-1.42.0/debian/ruby-rubocop-rspec/usr/share/rubygems-integration/all/gems/rubocop-rspec-1.42.0/lib/rubocop-rspec.rb @@ -1131,7 +1202,7 @@ rm -rf extensions cd gems/rubocop-rspec-1.42.0 rm -f -chmod 644 lib/rubocop/cop/rspec/describe_symbol.rb lib/rubocop/cop/rspec/predicate_matcher.rb lib/rubocop/cop/rspec/repeated_description.rb lib/rubocop/cop/rspec/shared_examples.rb lib/rubocop/cop/rspec/yield.rb lib/rubocop/cop/rspec/capybara/feature_methods.rb lib/rubocop/cop/rspec/capybara/current_path_expectation.rb lib/rubocop/cop/rspec/capybara/visibility_matcher.rb lib/rubocop/cop/rspec/variable_definition.rb lib/rubocop/cop/rspec/implicit_block_expectation.rb lib/rubocop/cop/rspec/implicit_expect.rb lib/rubocop/cop/rspec/describe_class.rb lib/rubocop/cop/rspec/named_subject.rb lib/rubocop/cop/rspec/expect_in_hook.rb lib/rubocop/cop/rspec/align_left_let_brace.rb lib/rubocop/cop/rspec/empty_line_after_subject.rb lib/rubocop/cop/rspec/hook_argument.rb lib/rubocop/cop/rspec/it_behaves_like.rb lib/rubocop/cop/rspec/repeated_example_group_description.rb lib/rubocop/cop/rspec/receive_never.rb lib/rubocop/cop/rspec/factory_bot/create_list.rb lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb lib/rubocop/cop/rspec/instance_variable.rb lib/rubocop/cop/rspec/unspecified_exception.rb lib/rubocop/cop/rspec/repeated_example.rb lib/rubocop/cop/rspec/single_argument_message_chain.rb lib/rubocop/cop/rspec/repeated_example_group_body.rb lib/rubocop/cop/rspec/void_expect.rb lib/rubocop/cop/rspec/example_length.rb lib/rubocop/cop/rspec/empty_line_after_hook.rb lib/rubocop/cop/rspec/described_class_module_wrapping.rb lib/rubocop/cop/rspec/implicit_subject.rb lib/rubocop/cop/rspec/context_wording.rb lib/rubocop/cop/rspec/message_spies.rb lib/rubocop/cop/rspec/empty_line_after_example.rb lib/rubocop/cop/rspec/pending.rb lib/rubocop/cop/rspec/multiple_subjects.rb lib/rubocop/cop/rspec/example_wording.rb lib/rubocop/cop/rspec/expect_output.rb lib/rubocop/cop/rspec/expect_actual.rb lib/rubocop/cop/rspec/empty_example_group.rb lib/rubocop/cop/rspec/hooks_before_examples.rb lib/rubocop/cop/rspec/message_chain.rb lib/rubocop/cop/rspec/empty_line_after_example_group.rb lib/rubocop/cop/rspec/invalid_predicate_matcher.rb lib/rubocop/cop/rspec/describe_method.rb lib/rubocop/cop/rspec/multiple_describes.rb lib/rubocop/cop/rspec/instance_spy.rb lib/rubocop/cop/rspec/overwriting_setup.rb lib/rubocop/cop/rspec/context_method.rb lib/rubocop/cop/rspec/around_block.rb lib/rubocop/cop/rspec/expect_change.rb lib/rubocop/cop/rspec/file_path.rb lib/rubocop/cop/rspec/described_class.rb lib/rubocop/cop/rspec/subject_stub.rb lib/rubocop/cop/rspec/receive_counts.rb lib/rubocop/cop/rspec/align_right_let_brace.rb lib/rubocop/cop/rspec/let_setup.rb lib/rubocop/cop/rspec/not_to_not.rb lib/rubocop/cop/rspec/leaky_constant_declaration.rb lib/rubocop/cop/rspec/before_after_all.rb lib/rubocop/cop/rspec/example_without_description.rb lib/rubocop/cop/rspec/multiple_expectations.rb lib/rubocop/cop/rspec/let_before_examples.rb lib/rubocop/cop/rspec/variable_name.rb lib/rubocop/cop/rspec/message_expectation.rb lib/rubocop/cop/rspec/return_from_stub.rb lib/rubocop/cop/rspec/be.rb lib/rubocop/cop/rspec/leading_subject.rb lib/rubocop/cop/rspec/focus.rb lib/rubocop/cop/rspec/missing_example_group_argument.rb lib/rubocop/cop/rspec/iterated_expectation.rb lib/rubocop/cop/rspec/nested_groups.rb lib/rubocop/cop/rspec/verified_doubles.rb lib/rubocop/cop/rspec/empty_line_after_final_let.rb lib/rubocop/cop/rspec/cop.rb lib/rubocop/cop/rspec/empty_hook.rb lib/rubocop/cop/rspec/rails/http_status.rb lib/rubocop/cop/rspec/scattered_let.rb lib/rubocop/cop/rspec/be_eql.rb lib/rubocop/cop/rspec/any_instance.rb lib/rubocop/cop/rspec/scattered_setup.rb lib/rubocop/cop/rspec/shared_context.rb lib/rubocop/cop/rspec/dialect.rb lib/rubocop/cop/rspec_cops.rb lib/rubocop/rspec/version.rb lib/rubocop/rspec/align_let_brace.rb lib/rubocop/rspec/example_group.rb lib/rubocop/rspec/config_formatter.rb lib/rubocop/rspec/top_level_describe.rb lib/rubocop/rspec/wording.rb lib/rubocop/rspec/language/node_pattern.rb lib/rubocop/rspec/hook.rb lib/rubocop/rspec/inject.rb lib/rubocop/rspec/variable.rb lib/rubocop/rspec/example.rb lib/rubocop/rspec/factory_bot.rb lib/rubocop/rspec/blank_line_separation.rb lib/rubocop/rspec/language.rb lib/rubocop/rspec/concept.rb lib/rubocop/rspec/top_level_group.rb lib/rubocop/rspec/final_end_location.rb lib/rubocop/rspec/corrector/move_node.rb lib/rubocop/rspec/node.rb lib/rubocop/rspec/description_extractor.rb lib/rubocop/rspec.rb lib/rubocop-rspec.rb +chmod 644 lib/rubocop/rspec/example_group.rb lib/rubocop/rspec/example.rb lib/rubocop/rspec/factory_bot.rb lib/rubocop/rspec/description_extractor.rb lib/rubocop/rspec/corrector/move_node.rb lib/rubocop/rspec/top_level_group.rb lib/rubocop/rspec/language.rb lib/rubocop/rspec/variable.rb lib/rubocop/rspec/language/node_pattern.rb lib/rubocop/rspec/concept.rb lib/rubocop/rspec/hook.rb lib/rubocop/rspec/blank_line_separation.rb lib/rubocop/rspec/node.rb lib/rubocop/rspec/align_let_brace.rb lib/rubocop/rspec/version.rb lib/rubocop/rspec/wording.rb lib/rubocop/rspec/final_end_location.rb lib/rubocop/rspec/inject.rb lib/rubocop/rspec/top_level_describe.rb lib/rubocop/rspec/config_formatter.rb lib/rubocop/cop/rspec_cops.rb lib/rubocop/cop/rspec/empty_example_group.rb lib/rubocop/cop/rspec/variable_definition.rb lib/rubocop/cop/rspec/message_spies.rb lib/rubocop/cop/rspec/shared_context.rb lib/rubocop/cop/rspec/unspecified_exception.rb lib/rubocop/cop/rspec/predicate_matcher.rb lib/rubocop/cop/rspec/empty_line_after_example_group.rb lib/rubocop/cop/rspec/describe_class.rb lib/rubocop/cop/rspec/scattered_setup.rb lib/rubocop/cop/rspec/message_expectation.rb lib/rubocop/cop/rspec/be.rb lib/rubocop/cop/rspec/multiple_expectations.rb lib/rubocop/cop/rspec/variable_name.rb lib/rubocop/cop/rspec/repeated_example_group_body.rb lib/rubocop/cop/rspec/void_expect.rb lib/rubocop/cop/rspec/example_without_description.rb lib/rubocop/cop/rspec/implicit_subject.rb lib/rubocop/cop/rspec/expect_actual.rb lib/rubocop/cop/rspec/capybara/feature_methods.rb lib/rubocop/cop/rspec/capybara/visibility_matcher.rb lib/rubocop/cop/rspec/capybara/current_path_expectation.rb lib/rubocop/cop/rspec/receive_never.rb lib/rubocop/cop/rspec/it_behaves_like.rb lib/rubocop/cop/rspec/empty_line_after_final_let.rb lib/rubocop/cop/rspec/receive_counts.rb lib/rubocop/cop/rspec/implicit_expect.rb lib/rubocop/cop/rspec/expect_in_hook.rb lib/rubocop/cop/rspec/describe_method.rb lib/rubocop/cop/rspec/expect_change.rb lib/rubocop/cop/rspec/scattered_let.rb lib/rubocop/cop/rspec/hooks_before_examples.rb lib/rubocop/cop/rspec/empty_hook.rb lib/rubocop/cop/rspec/rails/http_status.rb lib/rubocop/cop/rspec/instance_variable.rb lib/rubocop/cop/rspec/yield.rb lib/rubocop/cop/rspec/multiple_describes.rb lib/rubocop/cop/rspec/overwriting_setup.rb lib/rubocop/cop/rspec/implicit_block_expectation.rb lib/rubocop/cop/rspec/invalid_predicate_matcher.rb lib/rubocop/cop/rspec/leading_subject.rb lib/rubocop/cop/rspec/align_right_let_brace.rb lib/rubocop/cop/rspec/shared_examples.rb lib/rubocop/cop/rspec/dialect.rb lib/rubocop/cop/rspec/empty_line_after_example.rb lib/rubocop/cop/rspec/describe_symbol.rb lib/rubocop/cop/rspec/repeated_example.rb lib/rubocop/cop/rspec/expect_output.rb lib/rubocop/cop/rspec/example_wording.rb lib/rubocop/cop/rspec/focus.rb lib/rubocop/cop/rspec/not_to_not.rb lib/rubocop/cop/rspec/iterated_expectation.rb lib/rubocop/cop/rspec/message_chain.rb lib/rubocop/cop/rspec/verified_doubles.rb lib/rubocop/cop/rspec/repeated_description.rb lib/rubocop/cop/rspec/file_path.rb lib/rubocop/cop/rspec/context_wording.rb lib/rubocop/cop/rspec/named_subject.rb lib/rubocop/cop/rspec/empty_line_after_hook.rb lib/rubocop/cop/rspec/hook_argument.rb lib/rubocop/cop/rspec/subject_stub.rb lib/rubocop/cop/rspec/described_class_module_wrapping.rb lib/rubocop/cop/rspec/described_class.rb lib/rubocop/cop/rspec/any_instance.rb lib/rubocop/cop/rspec/nested_groups.rb lib/rubocop/cop/rspec/before_after_all.rb lib/rubocop/cop/rspec/let_before_examples.rb lib/rubocop/cop/rspec/pending.rb lib/rubocop/cop/rspec/let_setup.rb lib/rubocop/cop/rspec/leaky_constant_declaration.rb lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb lib/rubocop/cop/rspec/factory_bot/create_list.rb lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb lib/rubocop/cop/rspec/repeated_example_group_description.rb lib/rubocop/cop/rspec/cop.rb lib/rubocop/cop/rspec/align_left_let_brace.rb lib/rubocop/cop/rspec/be_eql.rb lib/rubocop/cop/rspec/around_block.rb lib/rubocop/cop/rspec/instance_spy.rb lib/rubocop/cop/rspec/return_from_stub.rb lib/rubocop/cop/rspec/missing_example_group_argument.rb lib/rubocop/cop/rspec/multiple_subjects.rb lib/rubocop/cop/rspec/single_argument_message_chain.rb lib/rubocop/cop/rspec/example_length.rb lib/rubocop/cop/rspec/empty_line_after_subject.rb lib/rubocop/cop/rspec/context_method.rb lib/rubocop/rspec.rb lib/rubocop-rspec.rb find lib/ -type d -empty -delete cd - cd - @@ -1151,690 +1222,658 @@ RUBYLIB=. GEM_PATH=/build/ruby-rubocop-rspec-1.42.0/debian/ruby-rubocop-rspec/usr/share/rubygems-integration/all:/build/ruby-rubocop-rspec-1.42.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/arm-linux-gnueabihf/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/arm-linux-gnueabihf/rubygems-integration/2.7.0 ruby2.7 -S rake -f debian/ruby-tests.rake /usr/bin/ruby2.7 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation -Randomized with seed 38629 +Randomized with seed 15072 -RuboCop::Cop::RSpec::Cop +RuboCop::Cop::RSpec::ExpectChange + with EnforcedStyle `method_call` + flags implicit block expectation syntax + ignores blocks that cannot be converted to obj/attribute pair + ignores change method of object that happens to receive a block + flags blocks that contain simple message sending + with EnforcedStyle `block` + flags implicit block expectation syntax + flags change matcher without block + ignores methods called change + flags change matcher when receiver is a variable with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - when the source path contains `/spec/` - registers an offense - when the source path ends with `_spec.rb` - ignores the file if it is ignored - registers an offense - when the file is a source file without "spec" in the name - ignores the source when the path is not a specified pattern - ignores the source when the path is not a spec file - when custom patterns are specified - registers offenses when the path matches a custom specified pattern - when the source path starts with `spec/` - registers an offense -RuboCop::Cop::RSpec::SharedExamples - does not register an offense when using Module/Class title - does not register an offense when using string title - registers an offense when using symbolic title +RuboCop::Cop::RSpec::AlignLeftLetBrace + works with empty file + registers offense for unaligned braces + does not register offense for let with proc argument with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - -RuboCop::Cop::RSpec::RepeatedDescription - registers offense for repeated description and metadata - ignores descriptions repeated in a shared context - does not flag different descriptions in different iterators - does not flag tests which do not contain description strings - does not flag different methods used as docstring - does not flag examples with same metadata and different description - registers offense for repeated description in different iterators - registers offense for repeated descriptions separated by a context - ignores repeated descriptions in a nested context - does not flag descriptions with different interpolated variables - registers an offense for repeated descriptions - does not flag examples if metadata is different - registers offense if same method used in docstring - registers offense for repeated description in same iterator - with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - -RuboCop::Cop::RSpec::LeakyConstantDeclaration - with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - class defined - flags inside an example group - ignores anonymous classes - flags namespaced class - module defined - flags inside an example group - constant assignment - ignores outside of example/shared group - flags inside shared example group - flags inside an example group - flags inside an example -CHANGELOG.md - has link definitions for all implicit links - entry - has a link to the contributors at the end - has a whitespace between the * and the body - body - ends with a punctuation - does not start with a lower case - link to related issue on github - has a valid URL - has an issue number prefixed with # - has a colon and a whitespace at the end - -RuboCop::Cop::RSpec::EmptyExampleGroup - flags an empty context - does not flag methods matching example group names - flags an empty top level describe - does not recognize custom include methods by default - does not flag include_examples - with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - when a custom include method is specified - does not flag an otherwise empty example group +RuboCop::RSpec::ExampleGroup + exposes examples in scope -RuboCop::Cop::RSpec::ReceiveCounts - flags usage of `at_most(1).times` - flags usage of `at_most(2).times` - allows exactly(1).times when not called on `receive` - flags usage of `exactly(1).times` with a block - flags usage of `at_least(1).times` - flags usage of `exactly(2).times` - flags usage of `exactly(1).times` - autocorrects `expect(foo).to have_published_event(:bar).exactly(2).times` to `expect(foo).to have_published_event(:bar).exactly(2).times` - flags usage of `at_least(2).times` with a block - allows `exactly(3).times` - flags usage of `exactly(1).times` after `with` - flags usage of `at_least(2).times` - flags usage of `exactly(1).times` with return value - allows `exactly(n).times` +RuboCop::Cop::RSpec::MessageExpectation + when EnforcedStyle is allow + generates a todo based on the detected style + generates a todo based on the detected style + flags expect(...).to receive + approves of allow(...).to receive + when EnforcedStyle is expect + approves of expect(...).to receive + generates a todo based on the detected style + flags allow(...).to receive + generates a todo based on the detected style with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - -RuboCop::Cop::RSpec::VariableName - with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - when configured for `camelCase` - when `let` - does not register offense for camelCase - registers an offense for snake_case - when `subject!` - does not register offense for camelCase - registers an offense for snake_case - when `let!` - registers an offense for snake_case - does not register offense for camelCase - when `subject` - does not register offense for camelCase - registers an offense for snake_case - when configured for `snake_case` - when `subject!` - registers an offense for camelCase - does not register offense for snake_case - when `let!` - does not register offense for snake_case - registers an offense for camelCase - when `let` with proc - registers offense - when `subject` - does not register offense for snake_case - registers an offense for camelCase - when `let` with string names - does not register offense for interpolated string - does not register an offense for snake_case - registers an offense for camelCase - registers an offense for kebab-case - when `let` with symbol names - registers an offense for camelCase - registers offense with multiple lets - registers an offense for PascalCase - does not register offense for interpolated symbol - does not register an offense for snake_case -RuboCop::Cop::RSpec::DescribeMethod - ignores describes with only a class - skips specs not having a string second argument - skips methods starting with a . or # - enforces non-method names +RuboCop::Cop::RSpec::RepeatedExampleGroupDescription + considers interpolated docstrings as different descriptions + register offense if same method used in docstring + does not register offense for different block descriptions + registers offense only for RSPEC namespace example groups + considers different classes as different descriptions + registers an offense for repeated describe descriptions + does not register offense for describe block with additional docstring + registers offense only for RSPEC namespace example groups in any order + registers offense only for example group + does not register offense for describe block with several docstring + does not register offense for example group without descriptions + register offense for different example group with similar descriptions + registers an offense with right pointing to lines of code + registers offense correctly if example groups are separated + registers an offense for repeated context descriptions + registers offense correctly for interpolated docstrings with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::ScatteredSetup - ignores hooks in different example groups - ignores different hooks - ignores hooks in different shared contexts - flags multiple before(:all) hooks in the same example group - ignores hooks with different metadata - flags multiple hooks in the same example group - ignores similar method names inside of examples - flags multiple hooks of the same scope with different symbols - ignores different hook types - flags hooks with similar metadata +RuboCop::Cop::RSpec::InvalidPredicateMatcher + registers an offense for double question with `not_to` + registers an offense for double question with `to_not` + registers an offense for double question with `have_something?` + registers an offense for double question + accepts valid predicate matcher with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb -RuboCop::Cop::RSpec::VoidExpect - accepts non-void `expect` with block - registers offenses to void `expect` with block - registers offenses to void `expect` - registers offenses to void `expect` when block has one expression - accepts non-void `expect` +RubocopBug + has an expectation + has a single example + +RuboCop::Cop::RSpec::Focus + flags focused block types + flags all rspec example blocks that include `:focus` + does not flag unfocused specs + does not flag a method that is focused twice + ignores non-rspec code with :focus blocks + flags all rspec example blocks with that include `focus: true` + flags rspec example blocks that include `:focus` preceding a hash with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher - does not register an offense when using `visible: :visible` - does not register an offense when using multiple options - registers an offense when using a selector` - does not register an offense when no options are given` - registers an offense when using `visible: false` - does not register an offense when using other options - registers an offense when using a using multiple options` - registers an offense when using `visible: true` - recognizes multiple matchers - does not register an offense when using `visible: :all` - does not register an offense when using `visible: :hidden` +RuboCop::Cop::RSpec::SubjectStub + flags nested subject stubs when nested subject uses same name + flags negated runners + flags spy subject stubs + flags chain stubs + flags an expectation made on an unnamed subject + ignores stub within context where subject name changed + flags deeply nested subject stubs + flags stub inside all matcher + flags one-line expectcation syntax + flags nested subject stubs when example group does not define subject + flags when subject is mocked + flags when an implicit subject is mocked + flags when subject is stubbed + flags multiple-method stubs + flags when an unnamed subject is mocked + flags nested subject stubs when adjacent context redefines + flags when subject is stubbed and there are several named subjects in the same example group + flags nested subject stubs + flags when there are several top level example groups + ignores nested stubs when nested subject is anonymous with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - -RuboCop::Cop::RSpec::MultipleSubjects - autocorrects - registers an offense for every overwritten subject - does not try to autocorrect subject! - does not flag shared example groups - with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + top level example groups + flags in top level feature + flags in top level ffeature + flags in top level shared_examples + flags in top level xcontext + flags in top level example_group + flags in top level shared_examples_for + flags in top level describe + flags in top level xfeature + flags in top level xdescribe + flags in top level context + flags in top level fdescribe + flags in top level shared_context + flags in top level fcontext RuboCop::RSpec::Example - returns node - extracts doc string for unimplemented examples - extracts implementation extracts doc string - extracts method doc string - extracts keywords returns nil for examples without doc strings + extracts implementation + returns node + extracts doc string for unimplemented examples extracts symbol doc string extracts interpolated doc string + extracts keywords + extracts method doc string value object semantics - computes #hash based on class and node can be used as a key in a hash compares by value + computes #hash based on class and node -RuboCop::Cop::RSpec::OverwritingSetup - finds `let!` overwriting `let` - handles unnamed subjects - finds overwriten `subject` - ignores overwriting in different context - works with `subject!` and `let!` - finds overwriten `let` - handles string arguments - handles dynamic names for `let` +RuboCop::RSpec::ConfigFormatter + builds a YAML dump with spacing between cops + +RuboCop::Cop::RSpec::MissingExampleGroupArgument + accepts describe with an argument + checks first argument of context + checks first argument of nested describe + checks first argument of describe + accepts methods with a name like an example block with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + +RuboCop::Cop::RSpec::AroundBlock + when no value is yielded + registers an offense + when passed to another method + does not register an offense + when #run is called + does not register an offense + when the yielded value is referenced but not used + registers an offense + when used as a block arg + does not register an offense + when the hook is scoped with a symbol + registers an offense + when yielded to another block + does not register an offense + when the yielded value is unused + registers an offense + when a method other than #run or #call is called + registers an offense + when two values are yielded and the first is unused + registers an offense for the first argument + when #call is called + does not register an offense + with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + +RuboCop::Cop::RSpec::IteratedExpectation + ignores `each` when there is a negative expectation + ignores `each` without expectation + flags `each` with multiple expectations + ignores `each` with expectation on property + flags `each` when expectation calls method with arguments + flags `each` with an expectation + ignore `each` when the body does not contain only expectations + ignores assignments in the iteration + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb RuboCop::Cop::RSpec::ItBehavesLike when the enforced style is `it_behaves_like` + does not flag a violation for it_behaves_like flags a violation for it_should_behave_like + when the enforced style is `it_should_behave_like` does not flag a violation for it_behaves_like + flags a violation for it_behaves_like + with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + +RuboCop::Cop::RSpec::Cop + when the file is a source file without "spec" in the name + ignores the source when the path is not a specified pattern + ignores the source when the path is not a spec file + when the source path ends with `_spec.rb` + ignores the file if it is ignored + registers an offense with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + when the source path starts with `spec/` + registers an offense + when the source path contains `/spec/` + registers an offense + when custom patterns are specified + registers offenses when the path matches a custom specified pattern + +RuboCop::Cop::RSpec::FactoryBot::CreateList + with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - when the enforced style is `it_should_behave_like` - does not flag a violation for it_behaves_like - flags a violation for it_behaves_like + when EnforcedStyle is :create_list + autocorrects `5.times { create :user }` to `create_list :user, 5` + autocorrects `5.times { create(:user, :trait) }` to `create_list(:user, 5, :trait)` + autocorrects `5.times { create :user, :trait, key: val }` to `create_list :user, 5, :trait, key: val` + autocorrects ` 3.times do + create(:user, :trait) { |user| create :account, user: user } + end +` to ` create_list(:user, 3, :trait) { |user| create :account, user: user } +` + ignores n.times when there is no create call inside + autocorrects ` 3.times do + create(:user, :trait) do |user| + create :account, user: user + create :profile, user: user + end + end +` to ` create_list(:user, 3, :trait) do |user| + create :account, user: user + create :profile, user: user + end +` + ignores n.times when there is other calls but create + flags FactoryGirl.create calls with a block + ignores create in other block + ignores n.times with argument + flags usage of n.times when FactoryGirl.create is used + flags usage of n.times when FactoryBot.create is used + flags usage of n.times with no arguments + autocorrects `5.times { FactoryGirl.create :user }` to `FactoryGirl.create_list :user, 5` + ignores create method of other object + when EnforcedStyle is :n_times + flags usage of FactoryGirl.create_list + flags usage of create_list + autocorrects `create_list :user, 5` to `5.times { create :user }` + autocorrects `FactoryGirl.create_list :user, 5` to `5.times { FactoryGirl.create :user }` + ignores create method of other object + autocorrects `create_list(:user, 5, :trait)` to `5.times { create(:user, :trait) }` + autocorrects `create_list :user, 5, :trait, key: val` to `5.times { create :user, :trait, key: val }` + flags usage of FactoryGirl.create_list with a block +RuboCop::Cop::RSpec::ContextMethod + ignores describe blocks + flags context with `#` at the beginning + flags context with `.` at the beginning + with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb - is insane +RuboCop::Cop::RSpec::LeadingSubject + handles subjects in tests + handles subjects in contexts + checks subject below let with proc argument + checks subject below hook + checks subject below let! + checks subject below let + checks subject below example + approves of subject above let + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -RuboCop::RSpec::DescriptionExtractor - builds a hash of descriptions +RuboCop::Cop::RSpec::ReceiveCounts + flags usage of `at_least(2).times` + allows `exactly(3).times` + flags usage of `at_least(2).times` with a block + flags usage of `exactly(1).times` with a block + flags usage of `at_most(2).times` + flags usage of `at_least(1).times` + flags usage of `exactly(2).times` + flags usage of `exactly(1).times` + flags usage of `at_most(1).times` + allows `exactly(n).times` + autocorrects `expect(foo).to have_published_event(:bar).exactly(2).times` to `expect(foo).to have_published_event(:bar).exactly(2).times` + flags usage of `exactly(1).times` after `with` + flags usage of `exactly(1).times` with return value + allows exactly(1).times when not called on `receive` + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation autocorrects `expect(page.current_path)` to `expect(page.current_path)` - autocorrects `expect(current_path).to eq(expected_path)` to `expect(page).to have_current_path(expected_path, ignore_query: true)` - autocorrects `expect(page.current_path).to match("string/")` to `expect(page).to have_current_path(/string\//)` - autocorrects `expect(current_path).not_to eq expected_path` to `expect(page).to have_no_current_path expected_path, ignore_query: true` flags violations for `expect(current_path)` - autocorrects `expect(page.current_path).to match(variable)` to `expect(page.current_path).to match(variable)` + autocorrects `expect(current_path).to_not eq expected_path` to `expect(page).to have_no_current_path expected_path, ignore_query: true` + doesn't flag a violation for other expectations + doesn't flag a violation for other references to `current_path` flags violations for `expect(page.current_path)` + autocorrects `expect(page.current_path).to match(/regexp/i)` to `expect(page).to have_current_path(/regexp/i)` + autocorrects `expect(current_path).not_to eq expected_path` to `expect(page).to have_no_current_path expected_path, ignore_query: true` autocorrects `expect(current_path).to eq(expected_path(f: :b))` to `expect(page).to have_current_path(expected_path(f: :b), ignore_query: true)` autocorrects `expect(page.current_path).to eq(foo(bar).path)` to `expect(page).to have_current_path(foo(bar).path, ignore_query: true)` - autocorrects `expect(page.current_path).to match(/regexp/i)` to `expect(page).to have_current_path(/regexp/i)` - autocorrects `expect(current_path).to(eq(expected_path))` to `expect(page).to(have_current_path(expected_path, ignore_query: true))` - autocorrects `expect(current_path).to_not eq expected_path` to `expect(page).to have_no_current_path expected_path, ignore_query: true` + autocorrects `expect(current_path).to eq(expected_path)` to `expect(page).to have_current_path(expected_path, ignore_query: true)` + autocorrects `expect(page.current_path).to match("string/")` to `expect(page).to have_current_path(/string\//)` autocorrects `expect(current_path).to eq expected_path` to `expect(page).to have_current_path expected_path, ignore_query: true` - doesn't flag a violation for other references to `current_path` - doesn't flag a violation for other expectations + autocorrects `expect(page.current_path).to match(variable)` to `expect(page.current_path).to match(variable)` + autocorrects `expect(current_path).to(eq(expected_path))` to `expect(page).to(have_current_path(expected_path, ignore_query: true))` with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb -RuboCop::Cop::RSpec::EmptyLineAfterHook - approves empty line after `around` hook - checks for empty line after `after` hook - handles `before` being the latest node - checks for empty line after `around` hook - approves empty line after `after` hook - approves empty line after `before` hook - handles multiline `around` block - checks for empty line after `before` hook - handles multiline `before` block - handles multiline `after` block +RuboCop::Cop::RSpec::ExampleLength + allows an empty example + allows a short example + ignores non-spec blocks + ignores comments + when inspecting large examples + flags the example with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + with CountComments enabled + flags the example -RuboCop::Cop::RSpec::HookArgument - when EnforcedStyle is :each - autocorrects `before(:each) { }` to `before(:each) { }` - ignores :context and :suite - detects :each for hooks - ignores hooks with more than one argument - autocorrects `before(:example) { }` to `before(:each) { }` - autocorrects `config.before(:example) { }` to `config.before(:each) { }` - autocorrects `config.before(:each) { }` to `config.before(:each) { }` - autocorrects `before { }` to `before(:each) { }` - generates a todo based on the detected style - autocorrects `config.before { }` to `config.before(:each) { }` - generates a todo based on the detected style - detects :example for hooks - generates a todo based on the detected style - detects hooks without default scopes - ignores non-rspec hooks - when EnforcedStyle is :example - generates a todo based on the detected style - does not flag hooks without default scopes - autocorrects `before(:example) { }` to `before(:example) { }` - ignores hooks with more than one argument - generates a todo based on the detected style - ignores non-rspec hooks - autocorrects `before { }` to `before(:example) { }` - autocorrects `config.before(:each) { }` to `config.before(:example) { }` - ignores :context and :suite - detects :each for hooks - autocorrects `config.before(:example) { }` to `config.before(:example) { }` - autocorrects `before(:each) { }` to `before(:example) { }` - generates a todo based on the detected style - autocorrects `config.before { }` to `config.before(:example) { }` - detects :example for hooks +RuboCop::Cop::RSpec::ReturnFromStub with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - when EnforcedStyle is :implicit - autocorrects `before { }` to `before { }` - ignores :context and :suite - ignores non-rspec hooks - ignores hooks with more than one argument - autocorrects `config.before(:example) { }` to `config.before { }` - autocorrects `before(:each) { }` to `before { }` - generates a todo based on the detected style - generates a todo based on the detected style - autocorrects `before(:example) { }` to `before { }` - does not flag hooks without default scopes - autocorrects `config.before(:each) { }` to `config.before { }` - detects :each for hooks - autocorrects `config.before { }` to `config.before { }` - generates a todo based on the detected style - detects :example for hooks + with EnforcedStyle `block` + finds nil returned from method + finds concatenated strings with no variables + finds hash with only static values returned from method + finds static values returned from chained method + ignores dynamic values returned from method + ignores string with interpolation returned from method + ignores multiple values being returned from method + finds static values returned from method + with EnforcedStyle `and_return` + finds array with only static values returned from block + finds nested constants returned from block + finds constants returned from block + finds concatenated strings with no variables + finds static values returned from block + ignores hash with dynamic values returned from block + finds static values in a block when there are chained methods + ignores variables return from block + ignores array with dynamic values returned from block + ignores stubs without return value + handles stubs in a method + finds empty values returned from block + ignores dynamic values returned from block + finds hash with only static values returned from block + ignores block returning string with interpolation -RuboCop::Cop::RSpec::ImplicitBlockExpectation - flags with `should_not` as implicit subject - flags named subject - flags literal lambda - flags with `should` as implicit subject - flags lambda in subject! - flags Proc.new - ignores named subject with deeply nested lambda - ignores non-lambda subject - ignores normal local subject - ignores when there is no subject defined - flags lambda in subject - flags when subject is defined in the outer example group - flags proc +RuboCop::Cop::RSpec::RepeatedDescription + ignores repeated descriptions in a nested context + registers offense if same method used in docstring + registers offense for repeated description and metadata + does not flag different descriptions in different iterators + does not flag examples with same metadata and different description + does not flag different methods used as docstring + registers offense for repeated descriptions separated by a context + registers offense for repeated description in different iterators + does not flag descriptions with different interpolated variables + ignores descriptions repeated in a shared context + does not flag examples if metadata is different + registers an offense for repeated descriptions + does not flag tests which do not contain description strings + registers offense for repeated description in same iterator with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb -RuboCop::Cop::RSpec::UnspecifiedException - with raise_error matcher - allows parameterized exceptions - allows exception types with messages - allows empty exception specification when not expecting an error - allows classes with blocks with braces - allows exception classes - allows exception matching regular expressions - allows exception messages - allows exception types with matching regular expressions - detects the `unspecified_exception` offense - allows classes with blocks with do/end - with raise_exception matcher - allows exception classes - allows exception types with messages - allows exception matching regular expressions - allows classes with blocks with do/end - allows parameterized exceptions - allows empty exception specification when not expecting an error - allows exception messages - allows classes with blocks with braces - allows exception types with matching regular expressions - detects the `unspecified_exception` offense +RuboCop::Cop::RSpec::ReceiveNever + allows method called `never` + flags usage of `never` after `with` + flags usage of `never` with `expect_any_instance_of` + flags usage of `never` with `is_expected` + flags usage of `never` with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::NotToNot + when AcceptedMethod is `to_not` + detects no offense when using `to_not` + detects the `not_to` offense + detects the `not_to` offense on an expect block + when EnforcedStyle is `not_to` + detects the `to_not` offense + detects no offense when using `not_to` + detects the `to_not` offense on an expect block + with default configuration does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb -RuboCop::Cop::RSpec::PredicateMatcher - when enforced style is `inflected` - when strict is true - autocorrects `expect(foo.is_a?(Array)).to be_truthy` to `expect(foo).to be_a(Array)` - autocorrects `expect(foo.instance_of?(Array)).to be_truthy` to `expect(foo).to be_an_instance_of(Array)` - accepts a predicate method that is not ckeced true/false - autocorrects `expect(foo.something?()).to be_truthy` to `expect(foo).to be_something()` - accepts strict checking boolean matcher - autocorrects `expect(foo.something?(1, 2)).to be_truthy` to `expect(foo).to be_something(1, 2)` - autocorrects `expect(foo.all? { |x| x.present? }).to be_truthy` to `expect(foo).to be_all { |x| x.present? }` - autocorrects `expect(foo.all? do; end).to be_truthy` to `expect(foo).to be_all do; end` - autocorrects `expect(foo.exists?).to be_truthy` to `expect(foo).to exist` - autocorrects `expect(foo.has_key?("foo")).to be_truthy` to `expect(foo).to have_key("foo")` - autocorrects `expect(foo.empty?).not_to be_falsey` to `expect(foo).to be_empty` - autocorrects `expect(foo.all?(n) { |x| x.present? }).to be_truthy` to `expect(foo).to be_all(n) { |x| x.present? }` - autocorrects `expect(foo.empty?).not_to a_truthy_value` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.all? { }).to be_truthy` to `expect(foo).to be_all { }` - autocorrects `expect(foo.all? { present }).to be_truthy` to `expect(foo).to be_all { present }` - autocorrects `expect(foo.has_something?).not_to be_truthy` to `expect(foo).not_to have_something` - autocorrects `expect(foo.something? 1, 2).to be_truthy` to `expect(foo).to be_something 1, 2` - autocorrects `expect(foo.include?(something)).to be_truthy` to `expect(foo).to include(something)` - registers an offense for a predicate method with built-in equiv - registers an offense for a predicate method with a block - autocorrects `expect(foo.empty?).not_to be_truthy` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).to be_truthy` to `expect(foo).to be_empty` - registers an offense for a predicate method with argument - accepts non-predicate method - autocorrects `expect(foo.respond_to?(:bar)).to be_truthy` to `expect(foo).to respond_to(:bar)` - autocorrects `expect(foo.empty?).to be_falsey` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).to_not be_truthy` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.has_something?).to be_truthy` to `expect(foo).to have_something` - registers an offense for a predicate method in actual - autocorrects ` expect(foo.all? do |x| - x + 1 - x >= 2 - end).to be_truthy -` to ` expect(foo).to be_all do |x| - x + 1 - x >= 2 - end -` - when strict is false - accepts a predicate method that is not ckeced true/false - autocorrects `expect(foo.empty?).to be(false)` to `expect(foo).not_to be_empty` - registers an offense for a predicate method with a block - autocorrects `expect(foo.something?()).to be_truthy` to `expect(foo).to be_something()` - autocorrects `expect(foo.something? 1, 2).to be_truthy` to `expect(foo).to be_something 1, 2` - autocorrects `expect(foo.instance_of?(Array)).to be_truthy` to `expect(foo).to be_an_instance_of(Array)` - autocorrects `expect(foo.all?(n) { |x| x.present? }).to be_truthy` to `expect(foo).to be_all(n) { |x| x.present? }` - autocorrects `expect(foo.empty?).to be(true)` to `expect(foo).to be_empty` - autocorrects `expect(foo.empty?).to be_truthy` to `expect(foo).to be_empty` - registers an offense for a predicate method with argument - autocorrects `expect(foo.has_key?("foo")).to be_truthy` to `expect(foo).to have_key("foo")` - autocorrects `expect(foo.something?(1, 2)).to be_truthy` to `expect(foo).to be_something(1, 2)` - autocorrects `expect(foo.empty?).not_to a_truthy_value` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).to_not be_truthy` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).not_to be(true)` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).not_to be_falsey` to `expect(foo).to be_empty` - autocorrects `expect(foo.all? do; end).to be_truthy` to `expect(foo).to be_all do; end` - autocorrects `expect(foo.all? { present }).to be_truthy` to `expect(foo).to be_all { present }` - registers an offense for a predicate method in actual - autocorrects `expect(foo.all? { |x| x.present? }).to be_truthy` to `expect(foo).to be_all { |x| x.present? }` - registers an offense for a predicate method with built-in equiv - autocorrects `expect(foo.empty?).not_to be(false)` to `expect(foo).to be_empty` - autocorrects `expect(foo.empty?).not_to be_truthy` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).to be_falsey` to `expect(foo).not_to be_empty` - autocorrects `expect(foo.empty?).to eq(false)` to `expect(foo).not_to be_empty` - registers an offense for a predicate method in actual - autocorrects `expect(foo.respond_to?(:bar)).to be_truthy` to `expect(foo).to respond_to(:bar)` - accepts non-predicate method - autocorrects ` expect(foo.all? do |x| - x + 1 - x >= 2 - end).to be_truthy -` to ` expect(foo).to be_all do |x| - x + 1 - x >= 2 - end -` - autocorrects `expect(foo.exists?).to be_truthy` to `expect(foo).to exist` - autocorrects `expect(foo.all? { }).to be_truthy` to `expect(foo).to be_all { }` - autocorrects `expect(foo.empty?).to eq(true)` to `expect(foo).to be_empty` - autocorrects `expect(foo.is_a?(Array)).to be_truthy` to `expect(foo).to be_a(Array)` - autocorrects `expect(foo.has_something?).not_to be_truthy` to `expect(foo).not_to have_something` - autocorrects `expect(foo.include?(something)).to be_truthy` to `expect(foo).to include(something)` - autocorrects `expect(foo.has_something?).to be_truthy` to `expect(foo).to have_something` - when enforced style is `explicit` - when strict is false - registers an offense for a predicate mather - autocorrects `expect(foo).not_to be_something` to `expect(foo.something?).to be_falsey` - autocorrects `expect(foo).to be_something` to `expect(foo.something?).to be_truthy` - autocorrects ` expect(foo).to be_all do |x| - x + 1 - x >= 2 - end -` to ` expect(foo.all? do |x| - x + 1 - x >= 2 - end).to be_truthy -` - autocorrects `expect(foo).to have_something` to `expect(foo.has_something?).to be_truthy` - registers an offense for a predicate mather with argument - autocorrects `expect(foo).to be_all { |x| x.present? }` to `expect(foo.all? { |x| x.present? }).to be_truthy` - autocorrects `expect(foo).to be_instance_of(Array)` to `expect(foo.instance_of?(Array)).to be_truthy` - autocorrects `expect(foo).to be_all(n) { |x| x.ok? }` to `expect(foo.all?(n) { |x| x.ok? }).to be_truthy` - autocorrects `expect(foo).to be_all { present }` to `expect(foo.all? { present }).to be_truthy` - autocorrects `expect(foo).to be_all { }` to `expect(foo.all? { }).to be_truthy` - autocorrects `expect(foo).to be_all do; end` to `expect(foo.all? do; end).to be_truthy` - autocorrects `expect(foo).to be_something 1, 2` to `expect(foo.something? 1, 2).to be_truthy` - autocorrects `expect(foo).to be_a(Array)` to `expect(foo.is_a?(Array)).to be_truthy` - autocorrects `expect(foo).to be_something(1, 2)` to `expect(foo.something?(1, 2)).to be_truthy` - registers an offense for a predicate matcher with a block - accepts built in matchers - accepts non-predicate matcher - autocorrects `expect(foo).to be_something(1)` to `expect(foo.something?(1)).to be_truthy` - autocorrects `expect(foo).to be_something()` to `expect(foo.something?()).to be_truthy` - when custom matchers are allowed - accepts custom allowed explicit matchers - when strict is true - autocorrects `expect(foo).not_to be_something` to `expect(foo.something?).to be(false)` - autocorrects `expect(foo).to be_something 1, 2` to `expect(foo.something? 1, 2).to be(true)` - autocorrects `expect(foo).to be_all do; end` to `expect(foo.all? do; end).to be(true)` - registers an offense for a predicate mather - autocorrects ` expect(foo).to be_all do |x| - x + 1 - x >= 2 - end -` to ` expect(foo.all? do |x| - x + 1 - x >= 2 - end).to be(true) -` - autocorrects `expect(foo).to be_something(1, 2)` to `expect(foo.something?(1, 2)).to be(true)` - autocorrects `expect(foo).to have_something` to `expect(foo.has_something?).to be(true)` - autocorrects `expect(foo).to be_all(n) { |x| x.ok? }` to `expect(foo.all?(n) { |x| x.ok? }).to be(true)` - registers an offense for a predicate matcher with a block - autocorrects `expect(foo).to be_something()` to `expect(foo.something?()).to be(true)` - registers an offense for a predicate mather with argument - accepts built in matchers - autocorrects `expect(foo).to be_something` to `expect(foo.something?).to be(true)` - autocorrects `expect(foo).to be_all { }` to `expect(foo.all? { }).to be(true)` - autocorrects `expect(foo).to be_all { |x| x.present? }` to `expect(foo.all? { |x| x.present? }).to be(true)` - autocorrects `expect(foo).to be_all { present }` to `expect(foo.all? { present }).to be(true)` - autocorrects `expect(foo).to be_instance_of(Array)` to `expect(foo.instance_of?(Array)).to be(true)` - accepts non-predicate matcher - autocorrects `expect(foo).to be_something(1)` to `expect(foo.something?(1)).to be(true)` - autocorrects `expect(foo).to be_a(Array)` to `expect(foo.is_a?(Array)).to be(true)` - when custom matchers are allowed - accepts custom allowed explicit matchers +RuboCop::Cop::RSpec::Yield + flags `block.call` with arguments + ignores stub when `block.call` is not the only statement + ignores `receive` with no block arguments + flags `block.call` when `receive` is chained + flags multiple `block.call` + flags `block.call` + flags multiple `block.call` with arguments with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::ExpectActual + flags string and symbol literal values within expect(...) + flags literal nil value within expect(...) + flags but does not autocorrect violations for other matchers + does not flag complex values with dynamic parts within expect(...) + does not flag dynamic values within expect(...) + flags arrays containing only literal values within expect(...) + flags with `equal` matcher + flags regexps containing only literal values within expect(...) + flags `be ==` + flags boolean literal values within expect(...) + flags ranges containing only literal values within expect(...) + flags numeric literal values within expect(...) + ignores `be` with no argument + flags `be` with an argument + flags with `eql` matcher + flags hashes containing only literal values within expect(...) + when inspecting rspec-rails routing specs + ignores rspec-rails routing specs + with default configuration does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb -RuboCop::Cop::RSpec::InvalidPredicateMatcher - registers an offense for double question with `have_something?` - registers an offense for double question with `not_to` - registers an offense for double question with `to_not` - registers an offense for double question - accepts valid predicate matcher +RuboCop::Cop::RSpec::VariableName with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + when configured for `snake_case` + when `let` with symbol names + does not register an offense for snake_case + registers an offense for PascalCase + does not register offense for interpolated symbol + registers an offense for camelCase + registers offense with multiple lets + when `subject` + does not register offense for snake_case + registers an offense for camelCase + when `subject!` + does not register offense for snake_case + registers an offense for camelCase + when `let` with proc + registers offense + when `let!` + does not register offense for snake_case + registers an offense for camelCase + when `let` with string names + registers an offense for kebab-case + registers an offense for camelCase + does not register offense for interpolated string + does not register an offense for snake_case + when configured for `camelCase` + when `let` + does not register offense for camelCase + registers an offense for snake_case + when `let!` + registers an offense for snake_case + does not register offense for camelCase + when `subject!` + does not register offense for camelCase + registers an offense for snake_case + when `subject` + does not register offense for camelCase + registers an offense for snake_case -RuboCop::Cop::RSpec::BeEql - registers an offense for `eql` when argument is nil - registers an offense for `eql` when argument is a boolean - registers an offense for `eql` when argument is an integer - registers an offense for `eql` when argument is a symbol - does not register an offense for `eql` when expectation is negated - registers an offense for `eql` when argument is a float - does not register an offense for `eql` when argument is a string +RuboCop::Cop::RSpec::ImplicitSubject + with EnforcedStyle `disallow` + flags `should` in single-line examples + allows `is_expected` inside `its` block + flags `is_expected` in single-line examples + flags `is_expected` in multi-line examples + flags `should` in multi-line examples + with EnforcedStyle `single_line_only` + detects usage of `is_expected` inside helper methods + flags `is_expected` in multi-line examples + allows `is_expected` inside `its` block, in multi-line examples + allows `should` in single-line examples + flags `should` in multi-line examples + allows `is_expected` in single-line examples + does not flag methods called is_expected and should + with EnforcedStyle `single_statement_only` + flags `is_expected` in multi-statement examples + allows `is_expected` in multi-line example with single statement with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -RuboCop::Cop::RSpec::VerifiedDoubles - finds a `double` instead of an `instance_double` - ignores instance_doubles - ignores doubles that have no name specified - when configuration does not specify IgnoreSymbolicNames - find doubles whose name is a symbol - finds a `spy` instead of an `instance_spy` +RuboCop::Cop::RSpec::VoidExpect + registers offenses to void `expect` with block + accepts non-void `expect` + accepts non-void `expect` with block + registers offenses to void `expect` when block has one expression + registers offenses to void `expect` with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - when configured not to ignore nameless doubles - flags doubles that have no name specified - when configured to ignore symbolic names - still flags doubles whose name is a string - ignores doubles whose name is a symbol + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -RuboCop::Cop::RSpec::SharedContext - shared_context - does not register an offense for `shared_context` with before - does not register an offense for `shared_context` with subject - does not register an offense for `shared_context` with let - does not register an offense for empty contexts - registers an offense for shared_context with only examples +RuboCop::Cop::RSpec::LeakyConstantDeclaration + class defined + flags namespaced class + ignores anonymous classes + flags inside an example group + module defined + flags inside an example group + constant assignment + flags inside shared example group + ignores outside of example/shared group + flags inside an example + flags inside an example group with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + +RuboCop::Cop::RSpec::AlignRightLetBrace + works with empty file + does not register offense for let with proc argument + registers offense for unaligned braces + with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - shared_examples - registers an offense for shared_examples with only subject - does not register an offense for `shared_examples` with it - registers an offense for shared_examples with only hooks - does not register an offense for empty examples - registers an offense for shared_examples with only let + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + +Project requires + alphabetizes cop requires RuboCop::Cop::RSpec::Capybara::FeatureMethods + ignores feature calls outside spec + ignores variables inside examples autocorrects ` describe Foo do - background { } + scenario { } end ` to ` describe Foo do - before { } + it { } end ` + flags violations for `given` autocorrects ` describe Foo do - given(:foo) { } + background { } end ` to ` describe Foo do - let(:foo) { } + before { } end ` - ignores variables inside examples autocorrects ` describe Foo do - xscenario { } + RSpec.feature { } end ` to ` describe Foo do - xit { } + RSpec.describe { } end ` - ignores feature calls outside spec - flags violations for `feature` - flags violations for `background` - flags violations for `xscenario` autocorrects ` describe Foo do - RSpec.feature { } + xscenario { } end ` to ` describe Foo do - RSpec.describe { } + xit { } end ` - flags violations for `given!` - allows includes before the spec autocorrects ` describe Foo do - scenario { } + given(:foo) { } end ` to ` describe Foo do - it { } + let(:foo) { } end ` + flags violations for `xscenario` flags violations for `scenario` + flags violations for `feature` + allows includes before the spec + flags violations for `background` + flags violations for `given!` autocorrects ` describe Foo do given!(:foo) { } end @@ -1842,731 +1881,1210 @@ let!(:foo) { } end ` - flags violations for `given` with configured `EnabledMethods` flags other methods ignores usage of the enabled method with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - -RuboCop::Cop::RSpec::ExpectInHook - accepts `expect` in `it` - accepts an empty `before` hook - adds an offense for `expect` in `before` hook - accepts `allow` in `before` hook - adds an offense for `expect` in `after` hook - adds an offense for `expect` in `around` hook - adds an offense for `expect` with block in `before` hook - with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb -RuboCop::Cop::RSpec::NamedSubject - when IgnoreSharedExamples is false - checks shared_examples for explicit subject usage - behaves like checking subject outside of shared examples - checks around(:each) for explicit subject usage - checks before and after for explicit subject usage - checks `it` and `specify` for explicit subject usage - ignores subject when not wrapped inside a test +RuboCop::Cop::RSpec::EmptyLineAfterSubject + approves empty line after subject! + checks for empty line after subject + checks for empty line after subject! + handles multiline subject block + handles subject being the latest node + approves empty line after subject + handles subjects in tests with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - when IgnoreSharedExamples is true - ignores explicit subject in shared_examples - behaves like checking subject outside of shared examples - ignores subject when not wrapped inside a test - checks `it` and `specify` for explicit subject usage - checks around(:each) for explicit subject usage - checks before and after for explicit subject usage - -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName - when passing block - flags passing a class from global namespace - ignores passing Hash - ignores passing OpenStruct - flags passing a subclass - ignores passing class name - flags passing a class - with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - when not passing block - flags passing a class - ignores passing class name -RuboCop::Cop::RSpec::MissingExampleGroupArgument - checks first argument of context - accepts describe with an argument - accepts methods with a name like an example block - checks first argument of describe - checks first argument of nested describe +RuboCop::Cop::RSpec::Pending + flags blocks with skip symbol metadata + ignores context + flags skip blocks + ignores it + ignores it with skip: false metadata + flags pending blocks + flags describe with skip symbol metadata + flags xexample + flags blocks with skip: true metadata + flags xfeature + flags blocks with skip: string metadata + flags skip inside of an it + flags blocks with pending symbol metadata + flags xspecify + ignores describe + ignores feature + flags xdescribe + flags xit + flags xscenario + ignores method called pending + ignores example + flags xcontext + ignores scenario + ignores specify + flags pending examples when receiver is explicit + ignores example_group with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::ExampleWording - skips words beginning with 'it' - skips interpolated description without literal `should` at the start - flags \-separated multiline strings - skips descriptions starting with words that begin with `should` - finds description with `SHOULDN'T` at the beginning - finds description with `shouldn't` at the beginning - flags \-separated multiline interpolated strings - ignores non-example blocks - finds leading it in interpolated description - flags a lone should - finds description with `should` at the beginning - finds leading its - flags a lone should not - finds description with `Should` at the beginning - finds interpolated description with `should` at the beginning - skips descriptions without `should` at the beginning +RuboCop::Cop::RSpec::BeEql + registers an offense for `eql` when argument is nil + does not register an offense for `eql` when argument is a string + registers an offense for `eql` when argument is a symbol + registers an offense for `eql` when argument is a float + registers an offense for `eql` when argument is an integer + registers an offense for `eql` when argument is a boolean + does not register an offense for `eql` when expectation is negated with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::DescribeSymbol - flags violations for a nested `describe` - flags violations for `describe :symbol` - does not flag non-Symbol arguments - flags violations for `RSpec.describe :symbol` - flags violations for `describe :symbol` with multiple arguments - does not flag `context :symbol` +RuboCop::Cop::RSpec::EmptyExampleGroup + flags an empty context + does not recognize custom include methods by default + flags an empty top level describe + does not flag methods matching example group names + does not flag include_examples with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + when a custom include method is specified + does not flag an otherwise empty example group -RuboCop::Cop::RSpec::BeforeAfterAll - when using after all - registers an offense - when using after each - does not register an offense - when using before each - does not register an offense +RuboCop::Cop::RSpec::SharedContext with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - when using before all - registers an offense + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + shared_context + does not register an offense for `shared_context` with before + does not register an offense for `shared_context` with subject + does not register an offense for empty contexts + registers an offense for shared_context with only examples + does not register an offense for `shared_context` with let + shared_examples + does not register an offense for `shared_examples` with it + registers an offense for shared_examples with only hooks + registers an offense for shared_examples with only subject + does not register an offense for empty examples + registers an offense for shared_examples with only let -RuboCop::Cop::RSpec::MultipleExpectations - generates a todo based on the worst violation +RuboCop::Cop::RSpec::MultipleSubjects + does not try to autocorrect subject! + autocorrects + registers an offense for every overwritten subject + does not flag shared example groups with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + +RuboCop::RSpec::DescriptionExtractor + builds a hash of descriptions + +RuboCop::Cop::RSpec::ExpectInHook + adds an offense for `expect` with block in `before` hook + adds an offense for `expect` in `after` hook + accepts `expect` in `it` + accepts an empty `before` hook + adds an offense for `expect` in `before` hook + adds an offense for `expect` in `around` hook + accepts `allow` in `before` hook + with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - with metadata - checks examples with `aggregate_failures: false` - prefers example metadata over example group metadata - ignores examples with `:aggregate_failures` - ignores examples with `aggregate_failures: true` - ignores example groups with `aggregate_failures: true` - ignores examples with `aggregate_failures: true` defined deeply - checks examples with siblings with `aggregate_failures: true` - ignores example groups with `:aggregate_failures` - checks example groups with `aggregate_failures: false` - without configuration - flags multiple expects with blocks - approves of one expectation per example - flags multiple expectations - counts every aggregate_failures as an expectation - counts aggregate_failures as one expectation - flags multiple is_expected - flags multiple expect_any_instance_of - with Max configuration - flags three expectations - permits two expectations + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::ReceiveNever - flags usage of `never` - flags usage of `never` with `expect_any_instance_of` - allows method called `never` - flags usage of `never` with `is_expected` - flags usage of `never` after `with` +RuboCop::Cop::RSpec::Be + registers an offense for `be` without an argument + allows specific `be_` matchers + allows `be` with an argument + registers an offense for not_to be with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb -RuboCop::Cop::RSpec::Focus - flags focused block types - ignores non-rspec code with :focus blocks - flags all rspec example blocks that include `:focus` - does not flag a method that is focused twice - flags all rspec example blocks with that include `focus: true` - does not flag unfocused specs - flags rspec example blocks that include `:focus` preceding a hash +RuboCop::Cop::RSpec::SingleArgumentMessageChain + receive_message_chain + accepts multi-argument string calls + accepts single-argument calls with variable + accepts multi-argument calls + accepts single-argument calls with send node + reports single-argument string calls + reports single-argument calls + with single-key hash argument + reports an offense + with multiple-element array argument + doesn't report an offense + with single-element array argument + reports an offense + with multiple keys hash argument + doesn't report an offense + stub_chain + accepts multi-argument calls + reports single-argument string calls + accepts multi-argument string calls + reports single-argument calls with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::Rails::HttpStatus - when EnforcedStyle is `numeric` - autocorrects `it { is_expected.to have_http_status :ok }` to `it { is_expected.to have_http_status 200 }` - autocorrects `it { is_expected.to have_http_status :not_found }` to `it { is_expected.to have_http_status 404 }` - does not register an offense when using numeric value - does not register an offense when using allowed symbols - registers an offense when using symbolic value - with parenthesis - autocorrects `it { is_expected.to have_http_status(:ok) }` to `it { is_expected.to have_http_status(200) }` - autocorrects `it { is_expected.to have_http_status(:not_found) }` to `it { is_expected.to have_http_status(404) }` +RuboCop::Cop::RSpec::DescribeClass + doesn't flag top level describe in a shared context + ignores nested describe statements + ignores feature specs - also with complex options + ignores routing specs + supports ::RSpec.describe + doesn't flag top level describe in a shared example + ignores feature specs when RSpec.describe is used + ignores request specs + ignores an empty describe + ignores view specs + checks describe statements after a require + checks first-line describe statements + flags normal metadata in describe + ignores feature specs + ignores system specs + supports RSpec.describe + checks highlights the first argument of a describe + doesn't flag top level describe in an unnamed shared context + flags specs with non :type metadata + doesn't blow up on single-line describes with default configuration does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - when EnforcedStyle is `symbolic` - autocorrects `it { is_expected.to have_http_status 200 }` to `it { is_expected.to have_http_status :ok }` - does not register an offense when using symbolic value - does not register an offense when using custom HTTP code - registers an offense when using numeric value - autocorrects `it { is_expected.to have_http_status 404 }` to `it { is_expected.to have_http_status :not_found }` - with parenthesis - autocorrects `it { is_expected.to have_http_status(404) }` to `it { is_expected.to have_http_status(:not_found) }` - autocorrects `it { is_expected.to have_http_status(200) }` to `it { is_expected.to have_http_status(:ok) }` + when argument is a String literal + ignores class without namespace + checks `camelCase` + ignores value constants with namespace + ignores class with namespace + ignores value constants + checks numbers at start + ignores top-level constants with `::` at start + checks empty strings -RuboCop::Cop::RSpec::ExampleWithoutDescription - with EnforcedStyle `single_line_only` - ignores missing description in single-line examples - flags missing description in multi-line examples - flags example with an empty string for description - with EnforcedStyle `always_allow` - ignores `it` without an argument - flags empty strings for description - ignores `it` with a description - with EnforcedStyle `disallow` - flags missing description in multi-line examples - flags missing description in single-line examples - ignores `it` with a description +RuboCop::Cop::RSpec::OverwritingSetup + finds overwriten `let` + works with `subject!` and `let!` + handles string arguments + ignores overwriting in different context + handles unnamed subjects + finds `let!` overwriting `let` + handles dynamic names for `let` + finds overwriten `subject` with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup - handles describes in an if block - checks for empty line after describe + checks for empty line after context highlights single line formulations correctly approves empty line after context - checks for empty line after context + handles describes in an if block + checks for empty line after describe approves empty line after describe with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -RuboCop::Cop::RSpec::RepeatedExampleGroupDescription - registers an offense for repeated describe descriptions - registers offense only for example group - registers offense correctly for interpolated docstrings - considers different classes as different descriptions - registers offense correctly if example groups are separated - does not register offense for different block descriptions - registers offense only for RSPEC namespace example groups - register offense for different example group with similar descriptions - registers an offense for repeated context descriptions - registers offense only for RSPEC namespace example groups in any order - registers an offense with right pointing to lines of code - does not register offense for describe block with additional docstring - does not register offense for describe block with several docstring - register offense if same method used in docstring - considers interpolated docstrings as different descriptions - does not register offense for example group without descriptions +RuboCop::RSpec::Language::SelectorSet + composes sets + compares by value + #node_pattern_union + builds a node pattern union + #send_pattern + builds a send matching pattern + #node_pattern + builds a node pattern + #block_pattern + builds a block matching pattern + #include? + returns false for selectors not in the set + returns true for selectors in the set + +RuboCop::Cop::RSpec::NestedGroups + counts nesting correctly when non-spec nesting + flags nested contexts + ignores non-spec context methods + support --auto-gen-config + when configured with MaxNesting + emits a deprecation warning + when Max is configured as 2 + flags two levels of nesting with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb -RuboCop::Cop::RSpec::ImplicitExpect +RuboCop::Cop::RSpec::DescribedClassModuleWrapping + allows a module that does not contain RSpec.describe + allows a describe block in the outermost scope + registers an offense when RSpec.describe is nested within two modules + registers an offense when RSpec.describe is nested within a module with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::RSpec::Hook + extracts name + #metadata + extracts symbol metadata + extracts hash metadata with no scope given + withstands no arguments + extracts hash metadata + combines symbol and hash metadata + #knowable_scope? + does not break if a hook is not given a symbol literal + knows the scope of a hook with a symbol literal + knows the scope of a hook with hash metadata + knows the scope of a hook with no argument + #scope + interprets before(:all) { } as having scope context + interprets around(:example) { } as having scope each + ignores other arguments to hooks + interprets after(:suite) { } as having scope suite + interprets before(:each) { } as having scope each + interprets after { } as having scope each + interprets around(:context) { } as having scope context + defaults to example hook with hash metadata + classifies :each as an example hook + +RuboCop::Cop::RSpec::NamedSubject + with default configuration does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - when EnforcedStyle is is_expected - approves of is_expected.not_to + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + when IgnoreSharedExamples is false + checks shared_examples for explicit subject usage + behaves like checking subject outside of shared examples + checks `it` and `specify` for explicit subject usage + checks before and after for explicit subject usage + ignores subject when not wrapped inside a test + checks around(:each) for explicit subject usage + when IgnoreSharedExamples is true + ignores explicit subject in shared_examples + behaves like checking subject outside of shared examples + ignores subject when not wrapped inside a test + checks around(:each) for explicit subject usage + checks `it` and `specify` for explicit subject usage + checks before and after for explicit subject usage + +RuboCop::Cop::RSpec::HookArgument + when EnforcedStyle is :example + autocorrects `config.before(:each) { }` to `config.before(:example) { }` + ignores non-rspec hooks generates a todo based on the detected style - flags it { should } - approves of is_expected.to - flags it { should_not } - approves of is_expected.to_not - when EnforcedStyle is should - flags it { is_expected.not_to } - flags it { is_expected.to_not } - flags it { is_expected.to } + autocorrects `before(:each) { }` to `before(:example) { }` + does not flag hooks without default scopes generates a todo based on the detected style + ignores hooks with more than one argument + ignores :context and :suite + autocorrects `before { }` to `before(:example) { }` + autocorrects `before(:example) { }` to `before(:example) { }` + autocorrects `config.before { }` to `config.before(:example) { }` + generates a todo based on the detected style + detects :example for hooks + detects :each for hooks + autocorrects `config.before(:example) { }` to `config.before(:example) { }` + when EnforcedStyle is :implicit + detects :each for hooks + generates a todo based on the detected style + generates a todo based on the detected style + generates a todo based on the detected style + autocorrects `config.before(:each) { }` to `config.before { }` + autocorrects `config.before { }` to `config.before { }` + ignores non-rspec hooks + autocorrects `before(:example) { }` to `before { }` + ignores :context and :suite + ignores hooks with more than one argument + autocorrects `before(:each) { }` to `before { }` + autocorrects `before { }` to `before { }` + does not flag hooks without default scopes + autocorrects `config.before(:example) { }` to `config.before { }` + detects :example for hooks + when EnforcedStyle is :each + ignores hooks with more than one argument + detects :example for hooks + autocorrects `before { }` to `before(:each) { }` + generates a todo based on the detected style + autocorrects `config.before(:each) { }` to `config.before(:each) { }` + autocorrects `config.before(:example) { }` to `config.before(:each) { }` + generates a todo based on the detected style + autocorrects `config.before { }` to `config.before(:each) { }` + autocorrects `before(:example) { }` to `before(:each) { }` + autocorrects `before(:each) { }` to `before(:each) { }` + detects :each for hooks + ignores non-rspec hooks + detects hooks without default scopes + ignores :context and :suite generates a todo based on the detected style - approves of should_not - approves of should - -RuboCop::Cop::RSpec::MultipleDescribes - skips single top level describe - finds multiple top level describes only with class - finds multiple top level describes with class and method with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::ExpectOutput - registers an offense for overwriting $stderr within an example scoped hook - does not flag assignments to $stdout outside of example scope - does not flag assigns to $stdout when in the root scope - registers an offense for overwriting $stdout within an example - does not register an offense for interacting with $stdout - does not flag assignments to $stdout in example_group scope - does not flag assignments to other global variables +RuboCop::Cop::RSpec::VerifiedDoubles + finds a `double` instead of an `instance_double` + ignores doubles that have no name specified + ignores instance_doubles + when configuration does not specify IgnoreSymbolicNames + finds a `spy` instead of an `instance_spy` + find doubles whose name is a symbol with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + when configured to ignore symbolic names + ignores doubles whose name is a symbol + still flags doubles whose name is a string + when configured not to ignore nameless doubles + flags doubles that have no name specified -Weirdness - quotes a string weird - uses a matcher - it does a thing - example at ./spec/smoke_tests/weird_rspec_spec.rb:176 - example at ./spec/smoke_tests/weird_rspec_spec.rb:51 - isnt a simple string - example at ./spec/smoke_tests/weird_rspec_spec.rb:37 - is expecting you - has chained expectations - It does a thing - example at ./spec/smoke_tests/weird_rspec_spec.rb:36 - example at ./spec/smoke_tests/weird_rspec_spec.rb:130 - is empty - works - is expecting you not to raise an error - has a description too - should not do the thing - isnt a simple string - examples - examples - lets the word 'examples' be 'examples' - dynamic - dynamic - lets the word 'dynamic' be 'dynamic' - who - who - lets the word 'who' be 'who' - likes - likes - lets the word 'likes' be 'likes' - -RuboCop::Cop::RSpec::SubjectStub - flags when there are several top level example groups - ignores nested stubs when nested subject is anonymous - flags when an implicit subject is mocked - flags when subject is stubbed - flags one-line expectcation syntax - flags when an unnamed subject is mocked - flags negated runners - flags deeply nested subject stubs - flags when subject is stubbed and there are several named subjects in the same example group - flags when subject is mocked - flags an expectation made on an unnamed subject - flags chain stubs - flags nested subject stubs - flags multiple-method stubs - flags stub inside all matcher - ignores stub within context where subject name changed - flags nested subject stubs when adjacent context redefines - flags nested subject stubs when example group does not define subject - flags nested subject stubs when nested subject uses same name - flags spy subject stubs - top level example groups - flags in top level shared_examples - flags in top level context - flags in top level xfeature - flags in top level feature - flags in top level fcontext - flags in top level ffeature - flags in top level describe - flags in top level xdescribe - flags in top level shared_examples_for - flags in top level shared_context - flags in top level fdescribe - flags in top level xcontext - flags in top level example_group +RuboCop::Cop::RSpec::DescribeMethod + skips methods starting with a . or # + ignores describes with only a class + skips specs not having a string second argument + enforces non-method names with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb RuboCop::Cop::RSpec::DescribedClass + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + when SkipBlocks is `false` + flags violations within all blocks + when EnforcedStyle is :explicit + ignores described_class as string + ignores violations within a class scope change + autocorrects corresponding + ignores describe that do not reference to a class + ignores violations within a hook scope change + flags the use of the described_class + when SkipBlocks is `true` + ignores violations within non-rspec blocks when EnforcedStyle is :described_class - flags the use of described class with module + ignores if a local variable is part of the namespace + flags the use of described class with nested namespace + ignores if `described_class` is a part of the constant ignores described class as string - ignores describe that do not reference to a class + flags the use of described class with namespace + flags with metadata + ignores non-matching namespace in usages ignores non-matching namespace + takes class from innermost describe flags for the use of the described class - ignores non-matching namespace in usages + flags the use of described class with module + ignores describe that do not reference to a class ignores class if the scope is changing - ignores if a local variable is part of the namespace - ignores if `described_class` is a part of the constant - takes class from innermost describe - flags the use of described class with namespace - ignores non-matching namespace defined on `describe` level - ignores violations within a class scope change - ignores violations within a hook scope change accepts an empty block - flags the use of described class with nested namespace - flags with metadata ignores subclasses + ignores violations within a class scope change + ignores non-matching namespace defined on `describe` level + ignores violations within a hook scope change + +RuboCop::Cop::RSpec::ScatteredSetup + flags multiple before(:all) hooks in the same example group + ignores different hooks + flags hooks with similar metadata + flags multiple hooks of the same scope with different symbols + ignores different hook types + flags multiple hooks in the same example group + ignores similar method names inside of examples + ignores hooks in different example groups + ignores hooks with different metadata + ignores hooks in different shared contexts + with default configuration + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + +RuboCop::Cop::RSpec::LetBeforeExamples + autocorrects ` RSpec.describe User do + include_examples('should be after let') + + let(:foo) { (<<-SOURCE) } + some long text here + SOURCE + end +` to ` RSpec.describe User do + let(:foo) { (<<-SOURCE) } + some long text here + SOURCE + include_examples('should be after let') + + end +` + allows inclusion of context before `let` + flags `let` with proc argument + ignores single-line example blocks + flags `let` after `context` + does not flag `let` in a nested context + flags `let` after `include_examples` + flags `let` after `it` + does not flag `let` before the examples with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - when SkipBlocks is `true` - ignores violations within non-rspec blocks - when EnforcedStyle is :explicit - ignores violations within a hook scope change - autocorrects corresponding - ignores describe that do not reference to a class - flags the use of the described_class - ignores described_class as string - ignores violations within a class scope change - when SkipBlocks is `false` - flags violations within all blocks -RuboCop::Cop::RSpec::ExpectChange - with EnforcedStyle `block` - flags change matcher without block - flags implicit block expectation syntax - flags change matcher when receiver is a variable - ignores methods called change - with EnforcedStyle `method_call` - flags implicit block expectation syntax - flags blocks that contain simple message sending - ignores blocks that cannot be converted to obj/attribute pair - ignores change method of object that happens to receive a block +RuboCop::Cop::RSpec::MessageChain + finds `receive_message_chain` + finds old `stub_chain` syntax with default configuration does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + +RuboCop::Cop::RSpec::Rails::HttpStatus + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + when EnforcedStyle is `symbolic` + autocorrects `it { is_expected.to have_http_status 200 }` to `it { is_expected.to have_http_status :ok }` + does not register an offense when using symbolic value + does not register an offense when using custom HTTP code + autocorrects `it { is_expected.to have_http_status 404 }` to `it { is_expected.to have_http_status :not_found }` + registers an offense when using numeric value + with parenthesis + autocorrects `it { is_expected.to have_http_status(200) }` to `it { is_expected.to have_http_status(:ok) }` + autocorrects `it { is_expected.to have_http_status(404) }` to `it { is_expected.to have_http_status(:not_found) }` + when EnforcedStyle is `numeric` + autocorrects `it { is_expected.to have_http_status :ok }` to `it { is_expected.to have_http_status 200 }` + does not register an offense when using allowed symbols + autocorrects `it { is_expected.to have_http_status :not_found }` to `it { is_expected.to have_http_status 404 }` + registers an offense when using symbolic value + does not register an offense when using numeric value + with parenthesis + autocorrects `it { is_expected.to have_http_status(:ok) }` to `it { is_expected.to have_http_status(200) }` + autocorrects `it { is_expected.to have_http_status(:not_found) }` to `it { is_expected.to have_http_status(404) }` -RuboCop::Cop::RSpec::Pending - ignores describe - ignores context - flags xcontext - flags blocks with pending symbol metadata - flags skip blocks - ignores it - ignores example_group - flags blocks with skip: true metadata - flags skip inside of an it - ignores example - flags pending examples when receiver is explicit - flags xspecify - ignores it with skip: false metadata - ignores method called pending - flags describe with skip symbol metadata - flags xit - flags xdescribe - flags pending blocks - ignores feature - flags blocks with skip: string metadata - flags xexample - flags xfeature - flags xscenario - ignores scenario - flags blocks with skip symbol metadata - ignores specify +RuboCop::Cop::RSpec::FactoryBot::FactoryClassName + when passing block + ignores passing class name + ignores passing OpenStruct + flags passing a class from global namespace + ignores passing Hash + flags passing a class + flags passing a subclass + when not passing block + ignores passing class name + flags passing a class + with default configuration + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::RepeatedExample + does not flag examples when different its arguments are used + registers an offense for repeated example + does not flag examples with different implementations + does not register a violation if rspec tag magic is involved + does not flag repeated examples in different scopes with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb -RuboCop::RSpec::ConfigFormatter - builds a YAML dump with spacing between cops - -RuboCop::Cop::RSpec::MessageExpectation +RuboCop::Cop::RSpec::InstanceVariable + ignores instance variables outside of specs + ignores an instance variable without describe + flags an instance variable inside a shared example + ignores non-spec blocks + ignores an instance variable inside a dynamic class + flags several instance variables inside a describe + flags an instance variable inside a describe with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - when EnforcedStyle is allow - approves of allow(...).to receive - flags expect(...).to receive - generates a todo based on the detected style - generates a todo based on the detected style - when EnforcedStyle is expect - flags allow(...).to receive - generates a todo based on the detected style - approves of expect(...).to receive - generates a todo based on the detected style + when used in a custom matcher + ignores instance variables inside `matcher` + flags instance variables outside `matcher` + ignores instance variables inside `RSpec::Matchers.define` + when configured with AssignmentOnly + ignores an instance variable when it is not assigned + flags an instance variable when it is also assigned + flags an instance variable when it is also assigned in a sibling example group -RuboCop::Cop::RSpec::InstanceSpy +RuboCop::Cop::RSpec::AnyInstance + finds `allow_any_instance_of` instead of an instance double + finds old `any_instance` syntax instead of an instance double + finds `expect_any_instance_of` instead of an instance double with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::ExpectOutput + does not flag assignments to $stdout in example_group scope + does not flag assignments to other global variables + does not flag assigns to $stdout when in the root scope + does not flag assignments to $stdout outside of example scope + registers an offense for overwriting $stdout within an example + registers an offense for overwriting $stderr within an example scoped hook + does not register an offense for interacting with $stdout + with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - when not used with `have_received` - does not add an offence + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::InstanceSpy when used with `have_received` ignores instance_double when it is not used with as_null_object adds an offense for an instance_double with single argument adds an offense for an instance_double with multiple arguments - -RuboCop::Cop::RSpec::LetSetup - ignores let! when used in `before` - complains when let! is used and not referenced in shared example group - ignores let! when used in example - complains when there is a custom nesting level - complains when let! is used and not referenced within nested group - complains when let! used in shared example including - complains when let! is used and not referenced - complains when there is only one nested node into example group with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + when not used with `have_received` + does not add an offence -RuboCop::Cop::RSpec::MessageSpies +config/default.yml + ends every description with a period + has descriptions for all cops + does not have newlines in cop descriptions + has configuration for all cops + sorts configuration keys alphabetically + includes Enabled: true for every cop + +RuboCop::Cop::RSpec::BeforeAfterAll + when using before each + does not register an offense with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - when EnforcedStyle is have_received - flags expect(const).to receive - generates a todo based on the detected style - approves of expect(...).to have_received - generates a todo based on the detected style - flags expect(lvar).to receive - flags expect(...).not_to receive - flags expect(...).to receive with - flags expect(...).to_not receive - flags expect(...).to receive at_most - flags expect(send).to receive - flags expect(ivar).to receive - when EnforcedStyle is receive - flags expect(const).to have_received - flags expect(...).to have_received at_most - generates a todo based on the detected style - flags expect(ivar).to have_received - generates a todo based on the detected style - flags expect(send).to have_received - approves of expect(...).to receive - flags expect(...).not_to have_received - flags expect(...).to_not have_received - flags expect(lvar).to have_received - flags expect(...).to have_received with + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + when using before all + registers an offense + when using after each + does not register an offense + when using after all + registers an offense RuboCop::Cop::RSpec::RepeatedExampleGroupBody - does not register offense when module arg namespace is different - registers offense only for RSPEC namespace example groups registers an offense for when module arg and namespace are identical - does not register offense if metadata is different - does not register offense if no descriptions, but different body - does not register offense with several docstring - skips `skip` and `pending` statements - does not register offense for example groups in different groups - does not register offense for same examples with different data - registers an offense for several repeated context body - registers offense no descriptions and similar body - registers an offense for repeated describe body does not register offense if module arg is different + registers offense correctly if example groups are separated registers offense only for example group + registers an offense for several repeated context body + does not register offense with several docstring + registers an offense for repeated describe body + skips `skip` and `pending` statements registers offense for different groups registers an offense for repeated context body - registers offense correctly if example groups are separated + registers offense no descriptions and similar body registers offense only for RSPEC namespace example groups in any order + registers offense only for RSPEC namespace example groups + does not register offense for same examples with different data + does not register offense when module arg namespace is different does not register offense for different block body implementation + does not register offense if metadata is different + does not register offense for example groups in different groups + does not register offense if no descriptions, but different body with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + +RuboCop::Cop::RSpec::MultipleExpectations + generates a todo based on the worst violation + with metadata + ignores examples with `aggregate_failures: true` + ignores examples with `aggregate_failures: true` defined deeply + checks examples with `aggregate_failures: false` + checks example groups with `aggregate_failures: false` + ignores example groups with `:aggregate_failures` + ignores examples with `:aggregate_failures` + ignores example groups with `aggregate_failures: true` + prefers example metadata over example group metadata + checks examples with siblings with `aggregate_failures: true` + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + without configuration + counts aggregate_failures as one expectation + approves of one expectation per example + counts every aggregate_failures as an expectation + flags multiple expectations + flags multiple expect_any_instance_of + flags multiple is_expected + flags multiple expects with blocks + with Max configuration + flags three expectations + permits two expectations -RuboCop::Cop::RSpec::EmptyLineAfterSubject - approves empty line after subject - approves empty line after subject! - handles multiline subject block - handles subject being the latest node - checks for empty line after subject - checks for empty line after subject! - handles subjects in tests +RuboCop::Cop::RSpec::LetSetup + complains when let! is used and not referenced within nested group + complains when let! used in shared example including + complains when let! is used and not referenced in shared example group + ignores let! when used in example + ignores let! when used in `before` + complains when there is only one nested node into example group + complains when let! is used and not referenced + complains when there is a custom nesting level with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::HooksBeforeExamples + flags `after` after an example + flags `before` after `include_examples` + flags `before` after `context` + flags scoped hook after an example + does not flag hooks before the examples + allows inclusion of context before hooks + does not flag `before` in a nested context + flags `before` after `it` + ignores single-line example blocks + with default configuration + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + +RuboCop::Cop::RSpec::ContextWording + finds context without `when` at the beginning + skips descriptions beginning with 'when' + finds context without separate `when` at the beginning + finds shared_context without `when` at the beginning + skips describe blocks + when configured + finds context without allowed prefixes at the beginning + skips descriptions with allowed prefixes at the beginning + with symbol metadata + finds context without separate `when` at the beginning + with mixed metadata + finds context without separate `when` at the beginning + with default configuration + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + with metadata hash + finds context without separate `when` at the beginning -RuboCop::Cop::RSpec::VariableDefinition - when EnforcedStyle is `strings` - registers an offense for interpolated symbol - registers an offense for symbol name - does not register offense for string names +RuboCop::Cop::RSpec::EmptyLineAfterHook + checks for empty line after `before` hook + handles `before` being the latest node + handles multiline `after` block + handles multiline `around` block + approves empty line after `before` hook + approves empty line after `after` hook + approves empty line after `around` hook + handles multiline `before` block + checks for empty line after `around` hook + checks for empty line after `after` hook with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + +RuboCop::Cop::RSpec::VariableDefinition + when EnforcedStyle is `strings` + does not register offense for string names + registers an offense for symbol name + registers an offense for interpolated symbol when EnforcedStyle is `symbols` - registers an offense for interpolated string does not register offense for symbol names + registers an offense for interpolated string registers an offense for multiline string registers an offense for string name + with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + +RuboCop::Cop::RSpec::UnspecifiedException + with raise_exception matcher + allows empty exception specification when not expecting an error + allows parameterized exceptions + detects the `unspecified_exception` offense + allows exception classes + allows exception matching regular expressions + allows exception types with matching regular expressions + allows classes with blocks with braces + allows classes with blocks with do/end + allows exception types with messages + allows exception messages + with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + with raise_error matcher + allows classes with blocks with do/end + detects the `unspecified_exception` offense + allows exception matching regular expressions + allows exception messages + allows classes with blocks with braces + allows exception classes + allows exception types with matching regular expressions + allows empty exception specification when not expecting an error + allows exception types with messages + allows parameterized exceptions + +CHANGELOG.md + has link definitions for all implicit links + entry + has a whitespace between the * and the body + has a link to the contributors at the end + link to related issue on github + has a valid URL + has an issue number prefixed with # + has a colon and a whitespace at the end + body + ends with a punctuation + does not start with a lower case + +RuboCop::Cop::RSpec::ImplicitBlockExpectation + flags with `should` as implicit subject + flags named subject + flags when subject is defined in the outer example group + flags with `should_not` as implicit subject + flags Proc.new + flags proc + flags literal lambda + flags lambda in subject! + ignores named subject with deeply nested lambda + flags lambda in subject + ignores non-lambda subject + ignores when there is no subject defined + ignores normal local subject + with default configuration + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + +RuboCop::Cop::RSpec::ImplicitExpect + when EnforcedStyle is should + flags it { is_expected.to } + flags it { is_expected.not_to } + approves of should + flags it { is_expected.to_not } + generates a todo based on the detected style + approves of should_not + generates a todo based on the detected style + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + when EnforcedStyle is is_expected + flags it { should_not } + flags it { should } + approves of is_expected.to + generates a todo based on the detected style + approves of is_expected.not_to + approves of is_expected.to_not RuboCop::RSpec::Wording - rewrites "SHOULDN'T BE true" as "IS NOT true" - rewrites "shouldn't be true" as "is not true" - rewrites "should" as "" rewrites "should fizz" as "fizzes" - rewrites "should WISH me luck" as "WISHES me luck" - rewrites "SHOULDN'T NOT RETAIN UPPERCASE" as "DOES NOT NOT RETAIN UPPERCASE" - rewrites "shouldn't return something" as "does not return something" - rewrites "should echo the input" as "echoes the input" - rewrites "SHOULD RETAIN UPPERCASE" as "RETAINS UPPERCASE" - rewrites "should obey my orders" as "obeys my orders" - rewrites "should amass debt" as "amasses debt" rewrites "shouldn't" as "does not" - rewrites "should wish me luck" as "wishes me luck" + rewrites "should deploy the app" as "deploys the app" + rewrites "should obey my orders" as "obeys my orders" + rewrites "should worry about the future" as "worries about the future" rewrites "should buy the product" as "buys the product" + rewrites "should do nothing" as "does nothing" + rewrites "should alias the method" as "aliases the method" + rewrites "should" as "" + rewrites "shouldn't be true" as "is not true" + rewrites "should echo the input" as "echoes the input" + rewrites "should not return something" as "does not return something" + rewrites "should WORRY" as "WORRIES" rewrites "should pay for pizza" as "pays for pizza" + rewrites "should fax the document" as "faxes the document" + rewrites "should miss me" as "misses me" + rewrites "should amass debt" as "amasses debt" + rewrites "SHOULDN'T NOT RETAIN UPPERCASE" as "DOES NOT NOT RETAIN UPPERCASE" + rewrites "SHOULD RETAIN UPPERCASE" as "RETAINS UPPERCASE" rewrites "should not" as "does not" - rewrites "should alias the method" as "aliases the method" rewrites "should have sweets" as "has sweets" rewrites "" as "" - rewrites "should worry about the future" as "worries about the future" - rewrites "should fax the document" as "faxes the document" - rewrites "should WORRY" as "WORRIES" - rewrites "should deploy the app" as "deploys the app" - rewrites "should do nothing" as "does nothing" - rewrites "should not return something" as "does not return something" - rewrites "should return something" as "returns something" - rewrites "should really only return one item" as "really only returns one item" - rewrites "should miss me" as "misses me" rewrites "should search the internet" as "searches the internet" + rewrites "should wish me luck" as "wishes me luck" + rewrites "SHOULDN'T BE true" as "IS NOT true" + rewrites "should WISH me luck" as "WISHES me luck" + rewrites "should really only return one item" as "really only returns one item" + rewrites "shouldn't return something" as "does not return something" + rewrites "should return something" as "returns something" -RuboCop::Cop::RSpec::ExpectActual - flags literal nil value within expect(...) - flags `be ==` - flags with `equal` matcher - ignores `be` with no argument - flags arrays containing only literal values within expect(...) - does not flag dynamic values within expect(...) - flags boolean literal values within expect(...) - flags with `eql` matcher - flags but does not autocorrect violations for other matchers - does not flag complex values with dynamic parts within expect(...) - flags hashes containing only literal values within expect(...) - flags string and symbol literal values within expect(...) - flags regexps containing only literal values within expect(...) - flags `be` with an argument - flags ranges containing only literal values within expect(...) - flags numeric literal values within expect(...) - when inspecting rspec-rails routing specs - ignores rspec-rails routing specs + + is insane + +RuboCop::Cop::RSpec::DescribeSymbol + does not flag `context :symbol` + flags violations for a nested `describe` + does not flag non-Symbol arguments + flags violations for `describe :symbol` with multiple arguments + flags violations for `RSpec.describe :symbol` + flags violations for `describe :symbol` with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb -RuboCop::Cop::RSpec::Be - allows `be` with an argument - allows specific `be_` matchers - registers an offense for `be` without an argument - registers an offense for not_to be +RuboCop::Cop::RSpec::Dialect + allows describe blocks + allows calling methods named context in examples + registers an offense for context blocks + registers an offense for RSpec.context blocks with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + without preferred methods + allows all methods blocks -RuboCop::Cop::RSpec::Yield - flags multiple `block.call` with arguments - flags multiple `block.call` - ignores stub when `block.call` is not the only statement - flags `block.call` when `receive` is chained - flags `block.call` with arguments - ignores `receive` with no block arguments - flags `block.call` +RuboCop::Cop::RSpec::MessageSpies + when EnforcedStyle is have_received + flags expect(send).to receive + flags expect(...).not_to receive + flags expect(ivar).to receive + generates a todo based on the detected style + flags expect(...).to receive with + generates a todo based on the detected style + flags expect(...).to receive at_most + flags expect(const).to receive + flags expect(...).to_not receive + flags expect(lvar).to receive + approves of expect(...).to have_received with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + when EnforcedStyle is receive + flags expect(...).not_to have_received + flags expect(...).to have_received at_most + flags expect(send).to have_received + flags expect(...).to_not have_received + approves of expect(...).to receive + flags expect(...).to have_received with + generates a todo based on the detected style + generates a todo based on the detected style + flags expect(lvar).to have_received + flags expect(ivar).to have_received + flags expect(const).to have_received -RuboCop::Cop::RSpec::ReturnFromStub - with EnforcedStyle `and_return` - ignores variables return from block - finds nested constants returned from block - finds constants returned from block - ignores hash with dynamic values returned from block - ignores block returning string with interpolation - finds empty values returned from block - handles stubs in a method - finds concatenated strings with no variables - finds array with only static values returned from block - finds static values in a block when there are chained methods - ignores array with dynamic values returned from block - ignores dynamic values returned from block - ignores stubs without return value - finds static values returned from block - finds hash with only static values returned from block +RuboCop::Cop::RSpec::ExampleWording + finds description with `shouldn't` at the beginning + skips descriptions starting with words that begin with `should` + finds leading its + ignores non-example blocks + finds interpolated description with `should` at the beginning + skips interpolated description without literal `should` at the start + finds leading it in interpolated description + flags \-separated multiline strings + flags a lone should + flags \-separated multiline interpolated strings + flags a lone should not + finds description with `Should` at the beginning + finds description with `should` at the beginning + skips descriptions without `should` at the beginning + finds description with `SHOULDN'T` at the beginning + skips words beginning with 'it' with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - with EnforcedStyle `block` - ignores multiple values being returned from method - finds concatenated strings with no variables - finds hash with only static values returned from method - finds nil returned from method - ignores dynamic values returned from method - ignores string with interpolation returned from method - finds static values returned from method - finds static values returned from chained method + +RuboCop::Cop::RSpec::PredicateMatcher + when enforced style is `inflected` + when strict is true + autocorrects `expect(foo.instance_of?(Array)).to be_truthy` to `expect(foo).to be_an_instance_of(Array)` + autocorrects ` expect(foo.all? do |x| + x + 1 + x >= 2 + end).to be_truthy +` to ` expect(foo).to be_all do |x| + x + 1 + x >= 2 + end +` + autocorrects `expect(foo.all? { }).to be_truthy` to `expect(foo).to be_all { }` + autocorrects `expect(foo.is_a?(Array)).to be_truthy` to `expect(foo).to be_a(Array)` + accepts strict checking boolean matcher + autocorrects `expect(foo.all?(n) { |x| x.present? }).to be_truthy` to `expect(foo).to be_all(n) { |x| x.present? }` + autocorrects `expect(foo.empty?).not_to be_truthy` to `expect(foo).not_to be_empty` + registers an offense for a predicate method with a block + autocorrects `expect(foo.empty?).not_to be_falsey` to `expect(foo).to be_empty` + registers an offense for a predicate method in actual + autocorrects `expect(foo.has_something?).not_to be_truthy` to `expect(foo).not_to have_something` + autocorrects `expect(foo.all? do; end).to be_truthy` to `expect(foo).to be_all do; end` + autocorrects `expect(foo.empty?).to_not be_truthy` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.something?()).to be_truthy` to `expect(foo).to be_something()` + autocorrects `expect(foo.something? 1, 2).to be_truthy` to `expect(foo).to be_something 1, 2` + autocorrects `expect(foo.empty?).to be_falsey` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.has_something?).to be_truthy` to `expect(foo).to have_something` + autocorrects `expect(foo.something?(1, 2)).to be_truthy` to `expect(foo).to be_something(1, 2)` + autocorrects `expect(foo.empty?).to be_truthy` to `expect(foo).to be_empty` + autocorrects `expect(foo.empty?).not_to a_truthy_value` to `expect(foo).not_to be_empty` + accepts a predicate method that is not ckeced true/false + autocorrects `expect(foo.include?(something)).to be_truthy` to `expect(foo).to include(something)` + autocorrects `expect(foo.respond_to?(:bar)).to be_truthy` to `expect(foo).to respond_to(:bar)` + autocorrects `expect(foo.all? { |x| x.present? }).to be_truthy` to `expect(foo).to be_all { |x| x.present? }` + autocorrects `expect(foo.all? { present }).to be_truthy` to `expect(foo).to be_all { present }` + autocorrects `expect(foo.exists?).to be_truthy` to `expect(foo).to exist` + accepts non-predicate method + autocorrects `expect(foo.has_key?("foo")).to be_truthy` to `expect(foo).to have_key("foo")` + registers an offense for a predicate method with argument + registers an offense for a predicate method with built-in equiv + when strict is false + autocorrects `expect(foo.empty?).to be_truthy` to `expect(foo).to be_empty` + autocorrects `expect(foo.all? { present }).to be_truthy` to `expect(foo).to be_all { present }` + registers an offense for a predicate method with a block + autocorrects `expect(foo.all? do; end).to be_truthy` to `expect(foo).to be_all do; end` + autocorrects `expect(foo.all? { }).to be_truthy` to `expect(foo).to be_all { }` + autocorrects `expect(foo.empty?).to be(true)` to `expect(foo).to be_empty` + autocorrects `expect(foo.empty?).not_to be_falsey` to `expect(foo).to be_empty` + autocorrects `expect(foo.empty?).to eq(false)` to `expect(foo).not_to be_empty` + accepts non-predicate method + autocorrects `expect(foo.include?(something)).to be_truthy` to `expect(foo).to include(something)` + autocorrects `expect(foo.empty?).to be(false)` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.empty?).not_to be(true)` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.has_key?("foo")).to be_truthy` to `expect(foo).to have_key("foo")` + registers an offense for a predicate method in actual + registers an offense for a predicate method in actual + autocorrects `expect(foo.has_something?).not_to be_truthy` to `expect(foo).not_to have_something` + autocorrects `expect(foo.instance_of?(Array)).to be_truthy` to `expect(foo).to be_an_instance_of(Array)` + autocorrects `expect(foo.exists?).to be_truthy` to `expect(foo).to exist` + autocorrects `expect(foo.all? { |x| x.present? }).to be_truthy` to `expect(foo).to be_all { |x| x.present? }` + autocorrects `expect(foo.is_a?(Array)).to be_truthy` to `expect(foo).to be_a(Array)` + accepts a predicate method that is not ckeced true/false + autocorrects `expect(foo.empty?).to be_falsey` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.something?(1, 2)).to be_truthy` to `expect(foo).to be_something(1, 2)` + autocorrects `expect(foo.all?(n) { |x| x.present? }).to be_truthy` to `expect(foo).to be_all(n) { |x| x.present? }` + autocorrects `expect(foo.empty?).not_to a_truthy_value` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.something? 1, 2).to be_truthy` to `expect(foo).to be_something 1, 2` + autocorrects `expect(foo.has_something?).to be_truthy` to `expect(foo).to have_something` + registers an offense for a predicate method with argument + autocorrects `expect(foo.empty?).to eq(true)` to `expect(foo).to be_empty` + autocorrects `expect(foo.respond_to?(:bar)).to be_truthy` to `expect(foo).to respond_to(:bar)` + autocorrects ` expect(foo.all? do |x| + x + 1 + x >= 2 + end).to be_truthy +` to ` expect(foo).to be_all do |x| + x + 1 + x >= 2 + end +` + autocorrects `expect(foo.empty?).to_not be_truthy` to `expect(foo).not_to be_empty` + autocorrects `expect(foo.something?()).to be_truthy` to `expect(foo).to be_something()` + autocorrects `expect(foo.empty?).not_to be_truthy` to `expect(foo).not_to be_empty` + registers an offense for a predicate method with built-in equiv + autocorrects `expect(foo.empty?).not_to be(false)` to `expect(foo).to be_empty` + with default configuration + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + when enforced style is `explicit` + when strict is true + autocorrects `expect(foo).to be_instance_of(Array)` to `expect(foo.instance_of?(Array)).to be(true)` + autocorrects `expect(foo).to be_something()` to `expect(foo.something?()).to be(true)` + registers an offense for a predicate mather with argument + autocorrects `expect(foo).to be_all(n) { |x| x.ok? }` to `expect(foo.all?(n) { |x| x.ok? }).to be(true)` + accepts non-predicate matcher + registers an offense for a predicate matcher with a block + autocorrects `expect(foo).to be_all { present }` to `expect(foo.all? { present }).to be(true)` + registers an offense for a predicate mather + autocorrects `expect(foo).to be_all do; end` to `expect(foo.all? do; end).to be(true)` + autocorrects ` expect(foo).to be_all do |x| + x + 1 + x >= 2 + end +` to ` expect(foo.all? do |x| + x + 1 + x >= 2 + end).to be(true) +` + autocorrects `expect(foo).to be_something` to `expect(foo.something?).to be(true)` + autocorrects `expect(foo).to be_all { }` to `expect(foo.all? { }).to be(true)` + autocorrects `expect(foo).to be_something(1)` to `expect(foo.something?(1)).to be(true)` + autocorrects `expect(foo).not_to be_something` to `expect(foo.something?).to be(false)` + autocorrects `expect(foo).to have_something` to `expect(foo.has_something?).to be(true)` + autocorrects `expect(foo).to be_something 1, 2` to `expect(foo.something? 1, 2).to be(true)` + autocorrects `expect(foo).to be_all { |x| x.present? }` to `expect(foo.all? { |x| x.present? }).to be(true)` + autocorrects `expect(foo).to be_something(1, 2)` to `expect(foo.something?(1, 2)).to be(true)` + accepts built in matchers + autocorrects `expect(foo).to be_a(Array)` to `expect(foo.is_a?(Array)).to be(true)` + when custom matchers are allowed + accepts custom allowed explicit matchers + when strict is false + autocorrects `expect(foo).to be_something` to `expect(foo.something?).to be_truthy` + autocorrects `expect(foo).to be_something 1, 2` to `expect(foo.something? 1, 2).to be_truthy` + autocorrects `expect(foo).to have_something` to `expect(foo.has_something?).to be_truthy` + autocorrects `expect(foo).to be_all(n) { |x| x.ok? }` to `expect(foo.all?(n) { |x| x.ok? }).to be_truthy` + registers an offense for a predicate matcher with a block + autocorrects `expect(foo).to be_all { |x| x.present? }` to `expect(foo.all? { |x| x.present? }).to be_truthy` + autocorrects `expect(foo).to be_all { }` to `expect(foo.all? { }).to be_truthy` + accepts built in matchers + autocorrects `expect(foo).to be_something(1)` to `expect(foo.something?(1)).to be_truthy` + registers an offense for a predicate mather with argument + accepts non-predicate matcher + autocorrects `expect(foo).to be_all { present }` to `expect(foo.all? { present }).to be_truthy` + autocorrects `expect(foo).to be_all do; end` to `expect(foo.all? do; end).to be_truthy` + autocorrects `expect(foo).to be_a(Array)` to `expect(foo.is_a?(Array)).to be_truthy` + registers an offense for a predicate mather + autocorrects `expect(foo).to be_something(1, 2)` to `expect(foo.something?(1, 2)).to be_truthy` + autocorrects `expect(foo).to be_something()` to `expect(foo.something?()).to be_truthy` + autocorrects `expect(foo).to be_instance_of(Array)` to `expect(foo.instance_of?(Array)).to be_truthy` + autocorrects `expect(foo).not_to be_something` to `expect(foo.something?).to be_falsey` + autocorrects ` expect(foo).to be_all do |x| + x + 1 + x >= 2 + end +` to ` expect(foo.all? do |x| + x + 1 + x >= 2 + end).to be_truthy +` + when custom matchers are allowed + accepts custom allowed explicit matchers + +RuboCop::Cop::RSpec::EmptyHook + with default configuration + does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/empty_spec.rb + with `append_after` hook + detects offense for empty `append_after` + accepts non-empty `append_after` hook + accepts multiline `append_after` hook + with `around` hook + accepts non-empty `around` hook + detects offense for empty `around` + accepts multiline `around` hook + with `prepend_before` hook + accepts non-empty `prepend_before` hook + accepts multiline `prepend_before` hook + detects offense for empty `prepend_before` + with `append_before` hook + accepts multiline `append_before` hook + detects offense for empty `append_before` + accepts non-empty `append_before` hook + with `prepend_after` hook + accepts non-empty `prepend_after` hook + detects offense for empty `prepend_after` + accepts multiline `prepend_after` hook + with `after` hook + accepts multiline `after` hook + detects offense for empty `after` + accepts non-empty `after` hook + with `before` hook + detects offense for empty `before` with :suite scope + autocorrects `before` with semicolon + accepts multiline `before` hook + detects offense for empty `before` with :example scope + detects offense for empty `before` + detects offense for empty `before` with :context scope + detects offense for empty `before` with :all scope + accepts non-empty `before` hook + detects offense for empty `before` with :each scope + +Weirdness + should not do the thing + is empty + quotes a string weird + has chained expectations + isnt a simple string + it does a thing + example at ./spec/smoke_tests/weird_rspec_spec.rb:176 + example at ./spec/smoke_tests/weird_rspec_spec.rb:130 + is expecting you + example at ./spec/smoke_tests/weird_rspec_spec.rb:36 + is expecting you not to raise an error + uses a matcher + It does a thing + example at ./spec/smoke_tests/weird_rspec_spec.rb:37 + works + has a description too + example at ./spec/smoke_tests/weird_rspec_spec.rb:51 + isnt a simple string + likes + likes + lets the word 'likes' be 'likes' + dynamic + dynamic + lets the word 'dynamic' be 'dynamic' + who + who + lets the word 'who' be 'who' + examples + examples + lets the word 'examples' be 'examples' RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically - registers an offense for offending code - registers an offense in a transient block - registers an offense in a trait - registers an offense for an attribute defined on `self` - does not add offense if out of factory bot block accepts valid sequence definition accepts valid factory definitions + does not add offense if method called on another object + registers an offense in a trait accepts valid traits_for_enum definition - does not add offense if method called on a local variable - registers an offense for attributes defined on explicit receiver autocorrects ` FactoryBot.define do factory :post do title "Something" @@ -2612,620 +3130,173 @@ end end ` - does not add offense if method called on another object + registers an offense for an attribute defined on `self` + does not add offense if method called on a local variable + does not add offense if out of factory bot block + registers an offense in a transient block accepts valid association definitions + registers an offense for attributes defined on explicit receiver + registers an offense for offending code with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - -RuboCop::RSpec::ExampleGroup - exposes examples in scope - -RuboCop::Cop::RSpec::ScatteredLet - doesnt flag `let!` in the middle of multiple `let`s - flags `let` with proc argument - works with heredocs - flags `let` at different nesting levels - flags `let` after the first different node - flags scattered `let!`s - with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - -RuboCop::Cop::RSpec::HooksBeforeExamples - flags `before` after `context` - flags scoped hook after an example - flags `before` after `it` - flags `before` after `include_examples` - ignores single-line example blocks - allows inclusion of context before hooks - flags `after` after an example - does not flag hooks before the examples - does not flag `before` in a nested context - with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - -RuboCop::RSpec::Hook - extracts name - #scope - classifies :each as an example hook - interprets before(:all) { } as having scope context - interprets before(:each) { } as having scope each - interprets after { } as having scope each - defaults to example hook with hash metadata - ignores other arguments to hooks - interprets around(:context) { } as having scope context - interprets after(:suite) { } as having scope suite - interprets around(:example) { } as having scope each - #metadata - combines symbol and hash metadata - withstands no arguments - extracts symbol metadata - extracts hash metadata - extracts hash metadata with no scope given - #knowable_scope? - knows the scope of a hook with hash metadata - knows the scope of a hook with a symbol literal - does not break if a hook is not given a symbol literal - knows the scope of a hook with no argument - -RuboCop::Cop::RSpec::DescribedClassModuleWrapping - registers an offense when RSpec.describe is nested within two modules - allows a module that does not contain RSpec.describe - allows a describe block in the outermost scope - registers an offense when RSpec.describe is nested within a module - with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - -RuboCop::Cop::RSpec::AroundBlock - when a method other than #run or #call is called - registers an offense - when two values are yielded and the first is unused - registers an offense for the first argument - when #run is called - does not register an offense - when no value is yielded - registers an offense - with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - when yielded to another block - does not register an offense - when passed to another method - does not register an offense - when used as a block arg - does not register an offense - when the yielded value is unused - registers an offense - when the hook is scoped with a symbol - registers an offense - when the yielded value is referenced but not used - registers an offense - when #call is called - does not register an offense - -RuboCop::Cop::RSpec::MessageChain - finds `receive_message_chain` - finds old `stub_chain` syntax - with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - -RuboCop::Cop::RSpec::LeadingSubject - checks subject below let - checks subject below example - checks subject below let! - checks subject below let with proc argument - handles subjects in tests - checks subject below hook - approves of subject above let - handles subjects in contexts - with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - -config/default.yml - has descriptions for all cops - includes Enabled: true for every cop - sorts configuration keys alphabetically - ends every description with a period - has configuration for all cops - does not have newlines in cop descriptions - -RuboCop::Cop::RSpec::DescribeClass - supports RSpec.describe - checks describe statements after a require - ignores an empty describe - ignores view specs - doesn't flag top level describe in a shared context - checks first-line describe statements - doesn't flag top level describe in a shared example - ignores feature specs - checks highlights the first argument of a describe - ignores system specs - ignores routing specs - ignores feature specs - also with complex options - doesn't flag top level describe in an unnamed shared context - ignores nested describe statements - ignores request specs - supports ::RSpec.describe - ignores feature specs when RSpec.describe is used - flags normal metadata in describe - doesn't blow up on single-line describes - flags specs with non :type metadata - when argument is a String literal - ignores value constants - checks empty strings - ignores class without namespace - checks `camelCase` - ignores value constants with namespace - ignores top-level constants with `::` at start - ignores class with namespace - checks numbers at start - with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - -RuboCop::Cop::RSpec::AlignLeftLetBrace - works with empty file - does not register offense for let with proc argument - registers offense for unaligned braces - with default configuration does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::RepeatedExample - does not flag repeated examples in different scopes - does not register a violation if rspec tag magic is involved - registers an offense for repeated example - does not flag examples when different its arguments are used - does not flag examples with different implementations +RuboCop::Cop::RSpec::ExampleWithoutDescription + with EnforcedStyle `single_line_only` + flags missing description in multi-line examples + ignores missing description in single-line examples + flags example with an empty string for description + with EnforcedStyle `always_allow` + flags empty strings for description + ignores `it` with a description + ignores `it` without an argument with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - -RuboCop::Cop::RSpec::EmptyLineAfterFinalLet - handles silly HEREDOC syntax for let - handles HEREDOC for let - ignores empty lines between the lets - flags missing empty line after a multiline comment after last let - flags missing empty line after the comment that comes after last let - allows comment followed by an empty line after let - handles let in tests - checks for empty line after last let - approves empty line after let - handles silly HEREDOC offense - checks for empty line after let with proc argument - handles multiline let block - handles let being the latest node - check for empty line after the last `let!` - with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + with EnforcedStyle `disallow` + flags missing description in single-line examples + flags missing description in multi-line examples + ignores `it` with a description -RuboCop::Cop::RSpec::NestedGroups - flags nested contexts - ignores non-spec context methods - counts nesting correctly when non-spec nesting - support --auto-gen-config +RuboCop::Cop::RSpec::EmptyLineAfterExample + flags mixed one-line and multi-line examples + flags a missing empty line after `specify` + ignores when an empty line is present + ignores consecutive one-liners + flags a missing empty line after `it` + flags one-line examples + when AllowConsecutiveOneLiners is false + ignores consecutive one-liners with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - when Max is configured as 2 - flags two levels of nesting - when configured with MaxNesting - emits a deprecation warning - -RuboCop::Cop::RSpec::EmptyHook - with `prepend_after` hook - accepts multiline `prepend_after` hook - accepts non-empty `prepend_after` hook - detects offense for empty `prepend_after` - with `prepend_before` hook - detects offense for empty `prepend_before` - accepts non-empty `prepend_before` hook - accepts multiline `prepend_before` hook - with `before` hook - detects offense for empty `before` with :suite scope - detects offense for empty `before` with :all scope - detects offense for empty `before` with :context scope - autocorrects `before` with semicolon - detects offense for empty `before` with :each scope - accepts non-empty `before` hook - accepts multiline `before` hook - detects offense for empty `before` - detects offense for empty `before` with :example scope - with `append_after` hook - detects offense for empty `append_after` - accepts multiline `append_after` hook - accepts non-empty `append_after` hook - with `after` hook - accepts non-empty `after` hook - accepts multiline `after` hook - detects offense for empty `after` - with `around` hook - accepts multiline `around` hook - accepts non-empty `around` hook - detects offense for empty `around` - with `append_before` hook - accepts non-empty `append_before` hook - accepts multiline `append_before` hook - detects offense for empty `append_before` - with default configuration - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -RuboCop::Cop::RSpec::SingleArgumentMessageChain +RuboCop::Cop::RSpec::ScatteredLet + flags scattered `let!`s + doesnt flag `let!` in the middle of multiple `let`s + flags `let` after the first different node + flags `let` at different nesting levels + flags `let` with proc argument + works with heredocs with default configuration - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - receive_message_chain - accepts multi-argument string calls - accepts multi-argument calls - reports single-argument calls - reports single-argument string calls - accepts single-argument calls with variable - accepts single-argument calls with send node - with multiple-element array argument - doesn't report an offense - with single-key hash argument - reports an offense - with single-element array argument - reports an offense - with multiple keys hash argument - doesn't report an offense - stub_chain - accepts multi-argument string calls - accepts multi-argument calls - reports single-argument string calls - reports single-argument calls - -RubocopBug - has an expectation - has a single example - -RuboCop::Cop::RSpec::InstanceVariable - flags an instance variable inside a describe - ignores an instance variable without describe - ignores non-spec blocks - flags several instance variables inside a describe - flags an instance variable inside a shared example - ignores instance variables outside of specs - ignores an instance variable inside a dynamic class - when used in a custom matcher - ignores instance variables inside `matcher` - ignores instance variables inside `RSpec::Matchers.define` - flags instance variables outside `matcher` - with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - when configured with AssignmentOnly - flags an instance variable when it is also assigned - ignores an instance variable when it is not assigned - flags an instance variable when it is also assigned in a sibling example group - -RuboCop::Cop::RSpec::NotToNot - when EnforcedStyle is `not_to` - detects the `to_not` offense - detects no offense when using `not_to` - detects the `to_not` offense on an expect block - when AcceptedMethod is `to_not` - detects the `not_to` offense on an expect block - detects no offense when using `to_not` - detects the `not_to` offense - with default configuration does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb -Project requires - alphabetizes cop requires - -RuboCop::RSpec::Language::SelectorSet - composes sets - compares by value - #include? - returns true for selectors in the set - returns false for selectors not in the set - #node_pattern_union - builds a node pattern union - #send_pattern - builds a send matching pattern - #block_pattern - builds a block matching pattern - #node_pattern - builds a node pattern - -RuboCop::Cop::RSpec::ContextMethod - flags context with `.` at the beginning - ignores describe blocks - flags context with `#` at the beginning +RuboCop::Cop::RSpec::Capybara::VisibilityMatcher + does not register an offense when using `visible: :hidden` + does not register an offense when using multiple options + does not register an offense when using `visible: :visible` + recognizes multiple matchers + does not register an offense when using `visible: :all` + registers an offense when using a selector` + registers an offense when using `visible: false` + does not register an offense when no options are given` + does not register an offense when using other options + registers an offense when using `visible: true` + registers an offense when using a using multiple options` with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - -RuboCop::Cop::RSpec::LetBeforeExamples - flags `let` with proc argument - flags `let` after `context` - does not flag `let` before the examples - flags `let` after `it` - ignores single-line example blocks - flags `let` after `include_examples` - does not flag `let` in a nested context - allows inclusion of context before `let` - autocorrects ` RSpec.describe User do - include_examples('should be after let') - - let(:foo) { (<<-SOURCE) } - some long text here - SOURCE - end -` to ` RSpec.describe User do - let(:foo) { (<<-SOURCE) } - some long text here - SOURCE - include_examples('should be after let') - - end -` - with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - -RuboCop::Cop::RSpec::IteratedExpectation - flags `each` when expectation calls method with arguments - ignores `each` without expectation - ignores assignments in the iteration - ignore `each` when the body does not contain only expectations - flags `each` with an expectation - ignores `each` with expectation on property - ignores `each` when there is a negative expectation - flags `each` with multiple expectations - with default configuration does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb RuboCop::Cop::RSpec::FilePath - registers an offense for a repeated .rb - skips specs that do not describe a class / method - allows flat hierarchies for class methods - allows flat hierarchies for instance methods - ignores non-alphanumeric characters - handles alphanumeric class names - allows flexibility with predicates - allows flexibility with operators + checks class specs + registers an offense for a bad path handles ACRONYMClassNames + registers an offense for a file missing _spec + checks instance methods + handles alphanumeric class names + allows subdirs for instance methods registers an offense for a file missing a .rb - handles ALLCAPS class names - registers an offense for a wrong class but a correct method - allows bang method - checks class specs - handles CamelCaps class names - allows subdirs for class methods registers an offense for a wrong class and highlights metadata - uses relative path for different path project - allows subdirs for instance methods - registers an offense for a wrong class name with a symbol argument - registers an offense for a file missing _spec allows different parent directories + handles CamelCaps class names + uses relative path + allows flexibility with predicates checks class methods + allows subdirs for class methods + registers an offense for a wrong class name with a symbol argument + ignores non-alphanumeric characters + skips specs that do have multiple top level describes + allows bang method + skips specs that do not describe a class / method registers an offense for a wrong class name - registers an offense for a bad path uses relative path for sibling directory project - skips specs that do have multiple top level describes - checks instance methods - uses relative path - when configured with CustomTransform - respects custom module name transformation - ignores routing specs + registers an offense for a repeated .rb + allows flat hierarchies for instance methods + handles ALLCAPS class names + registers an offense for a wrong class but a correct method + allows flexibility with operators + uses relative path for different path project + allows flat hierarchies for class methods with default configuration does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb + does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb + does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb + when configured with CustomTransform + ignores routing specs + respects custom module name transformation when configured with IgnoreMethods does not care about the described method when configured with SpecSuffixOnly registers an offense when _spec.rb suffix is missing does not care about the described class -RuboCop::Cop::RSpec::FactoryBot::CreateList - when EnforcedStyle is :n_times - autocorrects `FactoryGirl.create_list :user, 5` to `5.times { FactoryGirl.create :user }` - autocorrects `create_list :user, 5, :trait, key: val` to `5.times { create :user, :trait, key: val }` - flags usage of FactoryGirl.create_list with a block - autocorrects `create_list(:user, 5, :trait)` to `5.times { create(:user, :trait) }` - autocorrects `create_list :user, 5` to `5.times { create :user }` - flags usage of FactoryGirl.create_list - ignores create method of other object - flags usage of create_list - when EnforcedStyle is :create_list - autocorrects `5.times { create :user, :trait, key: val }` to `create_list :user, 5, :trait, key: val` - ignores create method of other object - flags usage of n.times when FactoryBot.create is used - flags usage of n.times with no arguments - flags usage of n.times when FactoryGirl.create is used - autocorrects ` 3.times do - create(:user, :trait) { |user| create :account, user: user } - end -` to ` create_list(:user, 3, :trait) { |user| create :account, user: user } -` - ignores create in other block - autocorrects `5.times { FactoryGirl.create :user }` to `FactoryGirl.create_list :user, 5` - autocorrects `5.times { create(:user, :trait) }` to `create_list(:user, 5, :trait)` - ignores n.times when there is other calls but create - ignores n.times with argument - autocorrects `5.times { create :user }` to `create_list :user, 5` - autocorrects ` 3.times do - create(:user, :trait) do |user| - create :account, user: user - create :profile, user: user - end - end -` to ` create_list(:user, 3, :trait) do |user| - create :account, user: user - create :profile, user: user - end -` - flags FactoryGirl.create calls with a block - ignores n.times when there is no create call inside - with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - -RuboCop::Cop::RSpec::AlignRightLetBrace - works with empty file - does not register offense for let with proc argument - registers offense for unaligned braces - with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - -RuboCop::Cop::RSpec::Dialect - registers an offense for context blocks - allows calling methods named context in examples - registers an offense for RSpec.context blocks - allows describe blocks +RuboCop::Cop::RSpec::EmptyLineAfterFinalLet + approves empty line after let + flags missing empty line after a multiline comment after last let + handles silly HEREDOC syntax for let + handles let in tests + ignores empty lines between the lets + handles silly HEREDOC offense + checks for empty line after let with proc argument + allows comment followed by an empty line after let + checks for empty line after last let + handles let being the latest node + handles HEREDOC for let + check for empty line after the last `let!` + handles multiline let block + flags missing empty line after the comment that comes after last let with default configuration does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - without preferred methods - allows all methods blocks - -RuboCop::Cop::RSpec::ExampleLength - allows a short example - allows an empty example - ignores non-spec blocks - ignores comments - with CountComments enabled - flags the example - when inspecting large examples - flags the example - with default configuration - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb -RuboCop::Cop::RSpec::ImplicitSubject - with EnforcedStyle `single_statement_only` - allows `is_expected` in multi-line example with single statement - flags `is_expected` in multi-statement examples +RuboCop::Cop::RSpec::SharedExamples + does not register an offense when using string title + does not register an offense when using Module/Class title + registers an offense when using symbolic title with default configuration does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - with EnforcedStyle `disallow` - flags `should` in multi-line examples - allows `is_expected` inside `its` block - flags `is_expected` in multi-line examples - flags `is_expected` in single-line examples - flags `should` in single-line examples - with EnforcedStyle `single_line_only` - detects usage of `is_expected` inside helper methods - flags `should` in multi-line examples - flags `is_expected` in multi-line examples - allows `should` in single-line examples - does not flag methods called is_expected and should - allows `is_expected` in single-line examples - allows `is_expected` inside `its` block, in multi-line examples - -RuboCop::Cop::RSpec::ContextWording - skips descriptions beginning with 'when' - finds shared_context without `when` at the beginning - skips describe blocks - finds context without `when` at the beginning - finds context without separate `when` at the beginning - with metadata hash - finds context without separate `when` at the beginning - with symbol metadata - finds context without separate `when` at the beginning - when configured - finds context without allowed prefixes at the beginning - skips descriptions with allowed prefixes at the beginning - with mixed metadata - finds context without separate `when` at the beginning - with default configuration - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb -RuboCop::Cop::RSpec::EmptyLineAfterExample - flags one-line examples - ignores consecutive one-liners - flags a missing empty line after `it` - ignores when an empty line is present - flags mixed one-line and multi-line examples - flags a missing empty line after `specify` - when AllowConsecutiveOneLiners is false - ignores consecutive one-liners +RuboCop::Cop::RSpec::MultipleDescribes + skips single top level describe + finds multiple top level describes with class and method + finds multiple top level describes only with class with default configuration does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb - does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb - does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb - -RuboCop::Cop::RSpec::AnyInstance - finds `expect_any_instance_of` instead of an instance double - finds old `any_instance` syntax instead of an instance double - finds `allow_any_instance_of` instead of an instance double - with default configuration does not crash on smoke test: spec/smoke_tests/no_tests_spec.rb does not crash on smoke test: spec/smoke_tests/empty_spec.rb - does not crash on smoke test: spec/smoke_tests/weird_rspec_spec.rb does not crash on smoke test: spec/smoke_tests/factory_bot_spec.rb -Finished in 25.55 seconds (files took 3.99 seconds to load) +Finished in 18.25 seconds (files took 3.28 seconds to load) 1499 examples, 0 failures -Randomized with seed 38629 +Randomized with seed 15072 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -3257,12 +3328,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/2226/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/2226/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/15497 and its subdirectories -I: Current time: Wed Aug 11 22:52:07 -12 2021 -I: pbuilder-time-stamp: 1628765527 +I: removing directory /srv/workspace/pbuilder/2226 and its subdirectories +I: Current time: Fri Aug 13 00:54:22 +14 2021 +I: pbuilder-time-stamp: 1628765662