diff --git a/.rubocop.yml b/.rubocop.yml index 53babd565..c740669fc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,7 @@ -require: - - rubocop-rspec +plugins: - rubocop-rails + - rubocop-rspec + - rubocop-rspec_rails - rubocop-capybara - rubocop-performance - rubocop-factory_bot diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6f94f9d78..d162a6aad 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,25 +1,11 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-03-12 05:45:42 UTC using RuboCop version 1.61.0. +# on 2026-04-23 21:02:38 UTC using RuboCop version 1.86.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 3 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. -# Include: **/*.gemfile, **/Gemfile, **/gems.rb -Bundler/OrderedGems: - Exclude: - - 'Gemfile' - -# Offense count: 180 -# Configuration parameters: EnforcedStyle. -# SupportedStyles: link_or_button, strict -Capybara/ClickLinkOrButtonStyle: - Enabled: false - # Offense count: 77 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. @@ -35,6 +21,12 @@ Capybara/NegationMatcher: - 'spec/features/sponsor_spec.rb' - 'spec/features/track_organizer_ability_spec.rb' +# Offense count: 6 +Capybara/NegationMatcherAfterVisit: + Exclude: + - 'spec/features/proposals_spec.rb' + - 'spec/features/splashpage_spec.rb' + # Offense count: 10 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: DefaultSelector. @@ -49,7 +41,7 @@ Capybara/RSpec/HaveSelector: - 'spec/features/track_organizer_ability_spec.rb' - 'spec/features/voting_spec.rb' -# Offense count: 101 +# Offense count: 106 # This cop supports safe autocorrection (--autocorrect). Capybara/SpecificFinders: Enabled: false @@ -67,8 +59,6 @@ FactoryBot/AssociationStyle: - 'spec/factories/tracks.rb' # Offense count: 4 -# Configuration parameters: Include. -# Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb FactoryBot/FactoryAssociationWithStrategy: Exclude: - 'spec/factories/booths.rb' @@ -87,8 +77,13 @@ Lint/AmbiguousBlockAssociation: - 'spec/controllers/schedules_controller_spec.rb' - 'spec/models/user_spec.rb' +# Offense count: 2 +Lint/CopDirectiveSyntax: + Exclude: + - 'app/helpers/versions_helper.rb' + # Offense count: 3 -# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. +# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch. Lint/DuplicateBranch: Exclude: - 'app/helpers/format_helper.rb' @@ -100,7 +95,15 @@ Lint/IneffectiveAccessModifier: - 'app/models/commercial.rb' - 'app/models/conference.rb' -# Offense count: 110 +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedMethods. +# AllowedMethods: present?, blank?, presence, try, try! +Lint/SafeNavigationConsistency: + Exclude: + - 'app/models/conference.rb' + +# Offense count: 115 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: Max: 72 @@ -109,19 +112,19 @@ Metrics/AbcSize: # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. # AllowedMethods: refine Metrics/BlockLength: - Max: 99 + Max: 108 -# Offense count: 13 +# Offense count: 15 # Configuration parameters: CountComments, CountAsOne. Metrics/ClassLength: Max: 270 -# Offense count: 28 +# Offense count: 26 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/CyclomaticComplexity: Max: 15 -# Offense count: 126 +# Offense count: 131 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: Max: 55 @@ -129,14 +132,12 @@ Metrics/MethodLength: # Offense count: 4 # Configuration parameters: CountComments, CountAsOne. Metrics/ModuleLength: - Max: 158 - Exclude: - - app/helpers/format_helper.rb + Max: 180 -# Offense count: 27 +# Offense count: 26 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/PerceivedComplexity: - Max: 17 + Max: 16 # Offense count: 13 Naming/AccessorMethodName: @@ -159,13 +160,23 @@ Naming/MethodParameterName: Exclude: - 'app/models/conference.rb' +# Offense count: 3 +# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates. +# AllowedMethods: call +# WaywardPredicates: infinite?, nonzero? +Naming/PredicateMethod: + Exclude: + - 'app/helpers/conference_helper.rb' + - 'app/helpers/format_helper.rb' + - 'config/initializers/fuckups.rb' + # Offense count: 2 -# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. -# NamePrefix: is_, has_, have_ -# ForbiddenPrefixes: is_, has_, have_ +# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs. +# NamePrefix: is_, has_, have_, does_ +# ForbiddenPrefixes: is_, has_, have_, does_ # AllowedMethods: is_a? # MethodDefinitionMacros: define_method, define_singleton_method -Naming/PredicateName: +Naming/PredicatePrefix: Exclude: - 'app/models/comment.rb' - 'app/models/contact.rb' @@ -173,7 +184,7 @@ Naming/PredicateName: # Offense count: 9 # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns. # SupportedStyles: snake_case, normalcase, non_integer -# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64 +# AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64 Naming/VariableNumber: Exclude: - 'app/models/program.rb' @@ -181,18 +192,6 @@ Naming/VariableNumber: - 'spec/models/payment_spec.rb' - 'spec/models/ticket_purchase_spec.rb' -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -Performance/Casecmp: - Exclude: - - 'config/environments/production.rb' - -# Offense count: 1 -# Configuration parameters: MinSize. -Performance/CollectionLiteralInLoop: - Exclude: - - 'app/models/conference.rb' - # Offense count: 4 # This cop supports unsafe autocorrection (--autocorrect-all). Performance/InefficientHashSearch: @@ -206,12 +205,6 @@ Performance/MapCompact: Exclude: - 'app/datatables/registration_datatable.rb' -# Offense count: 2 -# This cop supports unsafe autocorrection (--autocorrect-all). -Performance/StringInclude: - Exclude: - - 'app/models/commercial.rb' - # Offense count: 32 RSpec/AnyInstance: Exclude: @@ -231,29 +224,20 @@ RSpec/BeEmpty: - 'spec/controllers/conference_registration_controller_spec.rb' - 'spec/models/conference_spec.rb' -# Offense count: 12 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnabledMethods. -RSpec/Capybara/FeatureMethods: - Exclude: - - 'spec/features/proposals_spec.rb' - - 'spec/features/user_spec.rb' - - 'spec/features/voting_spec.rb' - -# Offense count: 339 +# Offense count: 342 # Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: Enabled: false -# Offense count: 141 +# Offense count: 148 # This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: SkipBlocks, EnforcedStyle. +# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants. # SupportedStyles: described_class, explicit RSpec/DescribedClass: Enabled: false -# Offense count: 251 +# Offense count: 254 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 222 @@ -279,21 +263,6 @@ RSpec/ExpectChange: - 'spec/models/event_spec.rb' - 'spec/models/user_spec.rb' -# Offense count: 9 -# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. -# Include: **/*_spec*rb*, **/spec/**/* -RSpec/FilePath: - Exclude: - - 'spec/controllers/conference_registration_controller_spec.rb' - - 'spec/controllers/physical_ticket_controller_spec.rb' - - 'spec/features/email_spec.rb' - - 'spec/features/omniauth_spec.rb' - - 'spec/features/proposals_spec.rb' - - 'spec/features/ticket_purchases_spec.rb' - - 'spec/features/venues_spec.rb' - - 'spec/models/comment_spec.rb' - - 'spec/models/openid.rb' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. @@ -307,6 +276,12 @@ RSpec/IdenticalEqualityAssertion: Exclude: - 'spec/controllers/admin/conferences_controller_spec.rb' +# Offense count: 4 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/IncludeExamples: + Exclude: + - 'spec/mailers/mailbot_spec.rb' + # Offense count: 53 # Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns. RSpec/IndexedLet: @@ -325,7 +300,7 @@ RSpec/IndexedLet: - 'spec/models/user_spec.rb' - 'spec/services/full_calendar_formatter_spec.rb' -# Offense count: 344 +# Offense count: 343 # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: @@ -345,7 +320,15 @@ RSpec/InstanceVariable: - 'spec/models/track_spec.rb' - 'spec/models/user_spec.rb' -# Offense count: 64 +# Offense count: 4 +RSpec/LeakyLocalVariable: + Exclude: + - 'spec/models/booth_spec.rb' + - 'spec/models/event_spec.rb' + - 'spec/models/track_spec.rb' + - 'spec/services/mailbluster_manager_spec.rb' + +# Offense count: 69 RSpec/LetSetup: Enabled: false @@ -368,16 +351,16 @@ RSpec/MultipleDescribes: Exclude: - 'spec/models/conference_spec.rb' -# Offense count: 300 +# Offense count: 310 RSpec/MultipleExpectations: Max: 97 -# Offense count: 274 +# Offense count: 283 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: Max: 32 -# Offense count: 438 +# Offense count: 441 # Configuration parameters: EnforcedStyle, IgnoreSharedExamples. # SupportedStyles: always, named_only RSpec/NamedSubject: @@ -397,7 +380,7 @@ RSpec/NamedSubject: - 'spec/models/ticket_spec.rb' - 'spec/models/track_spec.rb' -# Offense count: 219 +# Offense count: 220 # Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 7 @@ -412,12 +395,18 @@ RSpec/NoExpectationExample: - 'spec/features/proposals_spec.rb' - 'spec/features/voting_spec.rb' +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/Output: + Exclude: + - 'spec/support/wait_for_ajax..rb' + # Offense count: 1 RSpec/OverwritingSetup: Exclude: - 'spec/controllers/admin/booths_controller_spec.rb' -# Offense count: 11 +# Offense count: 13 RSpec/PendingWithoutReason: Exclude: - 'spec/ability/ability_spec.rb' @@ -425,35 +414,19 @@ RSpec/PendingWithoutReason: - 'spec/datatables/user_datatable_spec.rb' - 'spec/features/proposals_spec.rb' - 'spec/features/versions_spec.rb' + - 'spec/models/organization_spec.rb' - 'spec/models/user_spec.rb' # Offense count: 12 # This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: Inferences. -RSpec/Rails/InferredSpecType: - Exclude: - - 'spec/controllers/admin/comments_controller_spec.rb' - - 'spec/controllers/admin/programs_controller_spec.rb' - - 'spec/controllers/application_controller_spec.rb' - - 'spec/controllers/conference_registration_controller_spec.rb' - - 'spec/features/omniauth_spec.rb' - - 'spec/helpers/application_helper_spec.rb' - - 'spec/helpers/conference_helper_spec.rb' - - 'spec/helpers/date_time_helper_spec.rb' - - 'spec/helpers/events_helper_spec.rb' - - 'spec/helpers/format_helper_spec.rb' - - 'spec/helpers/users_helper_spec.rb' - - 'spec/routing/routing_spec.rb' - -# Offense count: 12 -# This cop supports safe autocorrection (--autocorrect). RSpec/ReceiveMessages: Exclude: - 'spec/models/track_spec.rb' -# Offense count: 4 +# Offense count: 6 RSpec/RepeatedDescription: Exclude: + - 'spec/ability/ability_spec.rb' - 'spec/models/conference_spec.rb' # Offense count: 2 @@ -478,6 +451,25 @@ RSpec/SortMetadata: Exclude: - 'spec/features/versions_spec.rb' +# Offense count: 8 +# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector. +# SupportedInflectors: default, active_support +RSpec/SpecFilePathFormat: + Exclude: + - 'spec/controllers/conference_registration_controller_spec.rb' + - 'spec/controllers/physical_ticket_controller_spec.rb' + - 'spec/features/email_spec.rb' + - 'spec/features/omniauth_spec.rb' + - 'spec/features/proposals_spec.rb' + - 'spec/features/ticket_purchases_spec.rb' + - 'spec/features/venues_spec.rb' + - 'spec/models/comment_spec.rb' + +# Offense count: 1 +RSpec/SpecFilePathSuffix: + Exclude: + - 'spec/models/openid.rb' + # Offense count: 9 RSpec/StubbedMock: Exclude: @@ -502,6 +494,24 @@ RSpec/VoidExpect: Exclude: - 'spec/models/conference_spec.rb' +# Offense count: 12 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Inferences. +RSpecRails/InferredSpecType: + Exclude: + - 'spec/controllers/admin/comments_controller_spec.rb' + - 'spec/controllers/admin/programs_controller_spec.rb' + - 'spec/controllers/application_controller_spec.rb' + - 'spec/controllers/conference_registration_controller_spec.rb' + - 'spec/features/omniauth_spec.rb' + - 'spec/helpers/application_helper_spec.rb' + - 'spec/helpers/conference_helper_spec.rb' + - 'spec/helpers/date_time_helper_spec.rb' + - 'spec/helpers/events_helper_spec.rb' + - 'spec/helpers/format_helper_spec.rb' + - 'spec/helpers/users_helper_spec.rb' + - 'spec/routing/routing_spec.rb' + # Offense count: 3 Security/Open: Exclude: @@ -521,12 +531,30 @@ Style/CaseLikeIf: Exclude: - 'app/views/admin/events/events.xlsx.axlsx' -# Offense count: 107 +# Offense count: 12 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CollectionQuerying: + Exclude: + - 'app/controllers/admin/conferences_controller.rb' + - 'app/controllers/admin/roles_controller.rb' + - 'app/models/conference.rb' + - 'app/models/ticket.rb' + - 'app/models/user.rb' + - 'spec/support/flash.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/ComparableBetween: + Exclude: + - 'app/models/survey.rb' + - 'app/models/track.rb' + +# Offense count: 109 # Configuration parameters: AllowedConstants. Style/Documentation: Enabled: false -# Offense count: 43 +# Offense count: 46 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never @@ -539,7 +567,7 @@ Style/GlobalStdStream: Exclude: - 'config/environments/production.rb' -# Offense count: 36 +# Offense count: 38 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. Style/GuardClause: @@ -551,12 +579,11 @@ Style/HashLikeCase: Exclude: - 'app/helpers/versions_helper.rb' -# Offense count: 2 +# Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). Style/HashTransformValues: Exclude: - 'app/controllers/admin/comments_controller.rb' - - 'app/helpers/chart_helper.rb' # Offense count: 4 # This cop supports unsafe autocorrection (--autocorrect-all). @@ -565,7 +592,7 @@ Style/IdenticalConditionalBranches: - 'app/controllers/admin/booths_controller.rb' - 'app/controllers/admin/events_controller.rb' -# Offense count: 34 +# Offense count: 38 # This cop supports safe autocorrection (--autocorrect). Style/IfUnlessModifier: Enabled: false @@ -610,7 +637,7 @@ Style/MutableConstant: Exclude: - 'app/models/event_user.rb' -# Offense count: 32 +# Offense count: 33 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns. # SupportedStyles: predicate, comparison @@ -627,6 +654,12 @@ Style/NumericPredicate: - 'app/models/ticket_purchase.rb' - 'app/models/user.rb' +# Offense count: 2 +# Configuration parameters: AllowedClasses. +Style/OneClassPerFile: + Exclude: + - 'app/models/user.rb' + # Offense count: 3 Style/OptionalArguments: Exclude: @@ -655,19 +688,28 @@ Style/RedundantConstantBase: - 'config/environments/production.rb' - 'spec/spec_helper.rb' -# Offense count: 3 +# Offense count: 2 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: SafeForConstants. Style/RedundantFetchBlock: Exclude: - 'config/puma.rb' -# Offense count: 2 +# Offense count: 3 # This cop supports safe autocorrection (--autocorrect). Style/RedundantStringEscape: Exclude: - 'app/models/conference.rb' +# Offense count: 5 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. +# AllowedMethods: present?, blank?, presence, try, try! +Style/SafeNavigation: + Exclude: + - 'app/models/conference.rb' + - 'app/models/event_schedule.rb' + # Offense count: 34 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Mode. @@ -687,7 +729,7 @@ Style/SymbolProc: - 'spec/controllers/admin/conferences_controller_spec.rb' - 'spec/support/flash.rb' -# Offense count: 1 +# Offense count: 7 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: WordRegex. # SupportedStyles: percent, brackets @@ -695,9 +737,9 @@ Style/WordArray: EnforcedStyle: percent MinSize: 5 -# Offense count: 269 +# Offense count: 288 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. +# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings. # URISchemes: http, https Layout/LineLength: Max: 267 diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 37d02a6e3..000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.3.8 diff --git a/.tool-versions b/.tool-versions index c47fe8b0d..4cfc8f3f4 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 3.3.8 +ruby 3.4 nodejs 16.20.2 diff --git a/Gemfile b/Gemfile index 9f888c822..625732273 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,8 @@ end source 'https://rubygems.org' -ruby file: '.tool-versions' +ruby '> 3.3.8' +# ruby file: '.tool-versions' # as web framework if next? @@ -38,7 +39,7 @@ gem 'cloudinary' # for internationalizing gem 'rails-i18n' # Windows: timezone data (required on Windows for tzinfo) -gem 'tzinfo-data', platforms: %i[ windows jruby ] +gem 'tzinfo-data', platforms: %i[windows jruby] # as authentification framework gem 'devise' @@ -232,7 +233,6 @@ group :test do # as test framework gem 'capybara' gem 'cucumber-rails', require: false - gem 'cucumber-rails-training-wheels' # basic imperative step defs like "Then I should see..." gem 'database_cleaner' gem 'geckodriver-helper' gem 'rspec-rails' @@ -266,15 +266,17 @@ group :development, :test, :linters do # for static code analisys gem 'rubocop', require: false - gem 'rubocop-rspec', require: false - gem 'rubocop-rails', require: false gem 'rubocop-capybara', require: false + gem 'rubocop-factory_bot', require: false gem 'rubocop-performance', require: false - gem 'haml_lint' + gem 'rubocop-rails', require: false + gem 'rubocop-rspec', require: false + gem 'rubocop-rspec_rails', require: false gem 'faraday-retry', require: false # TODO-SNAPCON: figure out which haml-lint OR haml_lint is good. gem 'haml-lint', require: false + gem 'haml_lint' # Easily run linters gem 'pronto', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 834cb45fa..d94a66254 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,7 +98,7 @@ GEM rake (>= 10.4, < 14.0) archive-zip (0.12.0) io-like (~> 0.3.0) - ast (2.4.2) + ast (2.4.3) autoprefixer-rails (10.4.16.0) execjs (~> 2) awesome_nested_set (3.6.0) @@ -160,7 +160,7 @@ GEM rest-client (>= 2.0.0) cocoon (1.2.15) colorize (1.1.0) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.6) countable-rails (0.0.1) railties (>= 3.1) crack (1.0.0) @@ -201,8 +201,6 @@ GEM railties (>= 5.0, < 8) rexml (~> 3.0) webrick (~> 1.7) - cucumber-rails-training-wheels (1.0.0) - cucumber-rails (>= 1.1.1) cucumber-tag-expressions (4.1.0) cucumber-wire (6.2.1) cucumber-core (~> 10.1, >= 10.1.0) @@ -237,6 +235,7 @@ GEM dotenv-rails (2.8.1) dotenv (= 2.8.1) railties (>= 3.2) + drb (2.2.3) erubi (1.13.0) execjs (2.9.1) factory_bot (6.4.6) @@ -254,8 +253,7 @@ GEM faraday (~> 2.0) fastimage (2.3.0) feature (1.4.0) - ffi (1.17.0-x64-mingw-ucrt) - ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.0) font-awesome-sass (6.5.1) sassc (~> 2.0) geckodriver-helper (0.24.0) @@ -293,7 +291,7 @@ GEM httparty (0.21.0) mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.5) + i18n (1.14.8) concurrent-ruby (~> 1.0) i18n_data (0.17.1) simple_po_parser (~> 1.1) @@ -312,12 +310,12 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (7.0.0) railties (>= 3.2.16) - json (2.7.1) + json (2.19.4) json-schema (4.1.1) addressable (>= 2.8) jsonapi-renderer (0.2.2) jwt (2.7.1) - language_server-protocol (3.17.0.3) + language_server-protocol (3.17.0.5) launchy (2.5.2) addressable (~> 2.8) leaflet-rails (1.9.3) @@ -329,6 +327,7 @@ GEM letter_opener (~> 1.7) railties (>= 5.2) rexml + lint_roller (1.1.0) logger (1.6.0) lograge (0.14.0) actionpack (>= 4) @@ -353,7 +352,10 @@ GEM rake mini_magick (4.13.2) mini_mime (1.1.5) - minitest (5.24.1) + mini_portile2 (2.8.9) + minitest (6.0.5) + drb (~> 2.0) + prism (~> 1.5) momentjs-rails (2.29.4.1) railties (>= 3.1) monetize (1.13.0) @@ -383,9 +385,8 @@ GEM next_rails (1.3.0) colorize (>= 0.8.1) nio4r (2.7.0) - nokogiri (1.16.6-x64-mingw-ucrt) - racc (~> 1.4) - nokogiri (1.16.6-x86_64-linux) + nokogiri (1.16.6) + mini_portile2 (~> 2.8.2) racc (~> 1.4) oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) @@ -425,8 +426,8 @@ GEM paper_trail (12.3.0) activerecord (>= 5.2) request_store (~> 1.1) - parallel (1.24.0) - parser (3.3.0.5) + parallel (1.28.0) + parser (3.3.11.1) ast (~> 2.4.1) racc pdf-core (0.9.0) @@ -451,6 +452,7 @@ GEM prawn-table prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) + prism (1.9.0) pronto (0.11.1) gitlab (>= 4.4.0, < 5.0) httparty (>= 0.13.7, < 1.0) @@ -468,8 +470,8 @@ GEM public_suffix (6.0.1) puma (6.4.2) nio4r (~> 2.0) - racc (1.8.0) - rack (2.2.9) + racc (1.8.1) + rack (2.2.23) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) @@ -517,7 +519,7 @@ GEM recaptcha (5.16.0) redcarpet (3.6.0) redis (4.7.1) - regexp_parser (2.9.0) + regexp_parser (2.12.0) request_store (1.6.0) rack (>= 1.4) responders (3.1.1) @@ -528,8 +530,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.3.6) - strscan + rexml (3.4.4) rolify (6.0.1) rqrcode (2.2.0) chunky_png (~> 1.0) @@ -556,34 +557,43 @@ GEM rspec-mocks (~> 3.12) rspec-support (~> 3.12) rspec-support (3.13.1) - rubocop (1.61.0) + rubocop (1.86.1) json (~> 2.3) - language_server-protocol (>= 3.17.0) - parallel (~> 1.10) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.1) - parser (>= 3.3.0.4) - rubocop-capybara (2.20.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.25.1) - rubocop (~> 1.41) - rubocop-performance (1.20.2) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rails (2.19.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.1) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-capybara (2.22.1) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-factory_bot (2.28.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rails (2.34.3) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.23.0) - rubocop (~> 1.33) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) + rubocop-rspec (3.9.0) + lint_roller (~> 1.1) + rubocop (~> 1.81) + rubocop-rspec_rails (2.32.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec (~> 3.5) ruby-oembed (0.17.0) ruby-openid (2.9.2) ruby-progressbar (1.13.0) @@ -641,15 +651,14 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.7.2-x64-mingw-ucrt) - sqlite3 (1.7.2-x86_64-linux) + sqlite3 (1.7.2) + mini_portile2 (~> 2.8.0) ssrf_filter (1.1.2) stripe (5.55.0) stripe-ruby-mock (3.1.0) dante (>= 0.2.0) multi_json (~> 1.0) stripe (> 5, < 6) - strscan (3.1.0) sys-uname (1.2.2) ffi (~> 1.1) sysexits (1.2.0) @@ -672,7 +681,7 @@ GEM tzinfo (>= 1.0.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) uniform_notifier (1.16.0) unobtrusive_flash (3.3.1) railties @@ -706,6 +715,7 @@ GEM PLATFORMS x64-mingw-ucrt + x86_64-darwin-24 x86_64-linux DEPENDENCIES @@ -733,7 +743,6 @@ DEPENDENCIES cocoon countable-rails cucumber-rails - cucumber-rails-training-wheels daemons dalli database_cleaner @@ -799,9 +808,11 @@ DEPENDENCIES rspec-rails rubocop rubocop-capybara + rubocop-factory_bot rubocop-performance rubocop-rails rubocop-rspec + rubocop-rspec_rails ruby-oembed sass-rails (>= 4.0.2) selectize-rails @@ -827,7 +838,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 3.3.10p183 + ruby 3.4.9p82 BUNDLED WITH 2.5.6 diff --git a/app/controllers/admin/volunteers_controller.rb b/app/controllers/admin/volunteers_controller.rb index c93ee9721..372794874 100644 --- a/app/controllers/admin/volunteers_controller.rb +++ b/app/controllers/admin/volunteers_controller.rb @@ -3,6 +3,7 @@ module Admin class VolunteersController < Admin::BaseController include VolunteersHelper + load_and_authorize_resource :conference, find_by: :short_title def index diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 672afae83..8d244e7f4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base before_action :set_paper_trail_whodunnit include ApplicationHelper include Pagy::Backend + add_flash_types :error protect_from_forgery with: :exception, prepend: true before_action :store_location diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index 2c3281e9a..41a037991 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -2,6 +2,7 @@ class ProposalsController < ApplicationController include ConferenceHelper + before_action :authenticate_user!, except: %i[show new create] load_resource :conference, find_by: :short_title load_resource :program, through: :conference, singleton: true diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index d4b0510e8..a427bc617 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -2,6 +2,7 @@ class RoomsController < ApplicationController include ConferenceHelper + before_action :authenticate_user! protect_from_forgery with: :null_session load_resource :conference, find_by: :short_title diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 492c98a7f..8d5703fd6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,6 +5,7 @@ # TODO-SNAPCON: Refactor this module. Move chunks to a dates_help, some events_helper module ApplicationHelper include Pagy::Frontend + # Returns a string build from the start and end date of the given conference. # # If the conference is only one day long diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 86f129806..0616fa431 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -44,7 +44,7 @@ def replacement_event_notice(event_schedule, styles: '') end def canceled_replacement_event_label(event, event_schedule, *label_classes) - if event.state == 'canceled' || event.state == 'withdrawn' + if ['canceled', 'withdrawn'].include?(event.state) content_tag :span, 'CANCELED', class: (%w[label label-danger] + label_classes) elsif event_schedule.present? && event_schedule.replacement?(@withdrawn_event_schedules) content_tag :span, 'REPLACEMENT', class: (%w[label label-info] + label_classes) @@ -287,7 +287,7 @@ def user_options_for_dropdown(event, column) options_for_select(users.map { |u| ["#{u[1]} (#{u[2]} #{u[3]})", u[0]] }, users.map(&:first)) end - def committee_only_actions(user, conference, roles: %i[organizer cfp], &block) + def committee_only_actions(user, conference, roles: %i[organizer cfp], &) return unless user role_map = roles.map { |role| { name: role, resource: conference } } @@ -295,7 +295,7 @@ def committee_only_actions(user, conference, roles: %i[organizer cfp], &block) content_tag(:div, class: 'panel panel-info') do concat content_tag(:div, 'Conference Organizers', class: 'panel-heading') - concat content_tag(:div, capture(&block), class: 'panel-body') + concat content_tag(:div, capture(&), class: 'panel-body') end end diff --git a/app/models/admin_ability.rb b/app/models/admin_ability.rb index 07e72ec20..9ea6af5e1 100644 --- a/app/models/admin_ability.rb +++ b/app/models/admin_ability.rb @@ -160,7 +160,7 @@ def signed_in_with_organizer_role(user, conf_ids_for_organization_admin = []) # Abilities for Role (Conference resource) can [:index, :show], Role do |role| - role.resource_type == 'Conference' || role.resource_type == 'Track' + ['Conference', 'Track'].include?(role.resource_type) end can [:edit, :update, :toggle_user], Role do |role| @@ -200,7 +200,7 @@ def signed_in_with_cfp_role(user) # Abilities for Role (Conference resource) can [:index, :show], Role do |role| - role.resource_type == 'Conference' || role.resource_type == 'Track' + ['Conference', 'Track'].include?(role.resource_type) end # Can add or remove users from role, when user has that same role for the conference # Eg. If you are member of the CfP team, you can add more CfP team members (add users to the role 'CfP') @@ -238,7 +238,7 @@ def signed_in_with_info_desk_role(user) # Abilities for Role (Conference resource) can [:index, :show], Role do |role| - role.resource_type == 'Conference' || role.resource_type == 'Track' + ['Conference', 'Track'].include?(role.resource_type) end # Can add or remove users from role, when user has that same role for the conference # Eg. If you are member of the CfP team, you can add more CfP team members (add users to the role 'CfP') @@ -263,7 +263,7 @@ def signed_in_with_volunteers_coordinator_role(user) # Abilities for Role (Conference resource) can [:index, :show], Role do |role| - role.resource_type == 'Conference' || role.resource_type == 'Track' + ['Conference', 'Track'].include?(role.resource_type) end # Can add or remove users from role, when user has that same role for the conference # Eg. If you are member of the CfP team, you can add more CfP team members (add users to the role 'CfP') @@ -299,7 +299,7 @@ def signed_in_with_track_organizer_role(user) # Show Roles in the admin sidebar and allow authorization of the index action can [:index, :show], Role do |role| - role.resource_type == 'Conference' || role.resource_type == 'Track' + ['Conference', 'Track'].include?(role.resource_type) end can :toggle_user, Role do |role| diff --git a/app/models/booth.rb b/app/models/booth.rb index b2cd0ff3b..47bc299f8 100644 --- a/app/models/booth.rb +++ b/app/models/booth.rb @@ -18,6 +18,7 @@ # class Booth < ApplicationRecord include ActiveRecord::Transitions + has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id } belongs_to :conference diff --git a/app/models/conference.rb b/app/models/conference.rb index 585420049..8c6b89aa2 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -39,6 +39,7 @@ # rubocop:disable Metrics/ClassLength class Conference < ApplicationRecord include RevisionCount + require 'uri' serialize :events_per_week, Hash # Needed to call 'Conference.with_role' in /models/ability.rb diff --git a/app/models/event.rb b/app/models/event.rb index 373a2ae63..dfd1efa88 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -381,7 +381,7 @@ def <=>(other) end def serializable_hash(options = {}) - super(options).merge('rendered_abstract' => markdown(abstract)) + super.merge('rendered_abstract' => markdown(abstract)) end private diff --git a/app/models/room.rb b/app/models/room.rb index 8bb55931e..0ec6f02c4 100644 --- a/app/models/room.rb +++ b/app/models/room.rb @@ -15,6 +15,7 @@ # class Room < ApplicationRecord include RevisionCount + belongs_to :venue has_many :event_schedules, dependent: :destroy has_many :tracks diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index 2577269e8..38f04ab7a 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -132,8 +132,6 @@ def render_email_data(event_template) end end -private - def set_week self.week = created_at.strftime('%W') save! diff --git a/app/models/user.rb b/app/models/user.rb index bfa75bb97..87cf99f7d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -82,6 +82,7 @@ def for_registration(conference) # A user may have an uploaded avatar or use gravatar. # The uploaded picture takes precedence. include Gravtastic + gravtastic size: 32 mount_uploader :picture, PictureUploader, mount_on: :picture diff --git a/app/services/mailbluster_manager.rb b/app/services/mailbluster_manager.rb index 2bb06f4e9..e9eb1f09f 100644 --- a/app/services/mailbluster_manager.rb +++ b/app/services/mailbluster_manager.rb @@ -1,5 +1,6 @@ class MailblusterManager include HTTParty + base_uri 'https://api.mailbluster.com/api/leads/' @auth_headers = { headers: { diff --git a/app/views/devise/shared/_openid_links.html.haml b/app/views/devise/shared/_openid_links.html.haml index 842b355db..df527b8b0 100644 --- a/app/views/devise/shared/_openid_links.html.haml +++ b/app/views/devise/shared/_openid_links.html.haml @@ -16,8 +16,3 @@ Snap %em> ! %br -.text-center - %em If you are not currently logged into Snap! or the Snap! Forums, you will need to log in to - Snap!Con twice when using your Snap! account. We're working on fixing this. Thanks! - -%br diff --git a/config/environments/development.rb b/config/environments/development.rb index 275bd6525..83812322d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -131,6 +131,18 @@ secret: 'github_mock_secret' } ) + + OmniAuth.config.mock_auth[:discourse] = + OmniAuth::AuthHash.new( + provider: 'discourse', + uid: 'discourse-test-uid-1', + info: { + name: 'snap user', + email: 'user-snap@example.com', + username: 'user_snap' + } + ) + config.after_initialize do Devise.setup do |devise_config| # Enable ichain test mode diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 20960f3e5..87227c340 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -14,9 +14,8 @@ name: 'google', scope: %w[email profile] - # TODO-SNAPCON: This ought to be configurable. Use OSEM_DISCOURSE_KEY? config.omniauth :discourse, - sso_url: 'https://forum.snap.berkeley.edu/session/sso_provider', + sso_url: ENV.fetch('OSEM_SNAP_SSO_URL', 'https://snap.berkeley.edu/api/v1/discourse-sso'), sso_secret: ENV.fetch('OSEM_DISCOURSE_SECRET', nil) config.omniauth :facebook, diff --git a/config/puma.rb b/config/puma.rb index 69424aac8..93ad7c872 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -27,13 +27,13 @@ worker_count = ENV.fetch('WEB_CONCURRENCY') { Gem.win_platform? ? 0 : 2 }.to_i workers worker_count # Set a 10 minute timeout in development for debugging. -worker_timeout 60 * 60 * 10 if ENV.fetch('RAILS_ENV') == 'development' && worker_count > 0 +worker_timeout 60 * 60 * 10 if ENV.fetch('RAILS_ENV') == 'development' && worker_count.positive? # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write # process behavior so workers use less memory. -preload_app! if worker_count > 0 +preload_app! if worker_count.positive? lowlevel_error_handler do |ex, env| Sentry.capture_exception( diff --git a/dotenv.example b/dotenv.example index 372800ec9..b39ac6380 100644 --- a/dotenv.example +++ b/dotenv.example @@ -67,6 +67,15 @@ # OSEM_GITHUB_KEY=1234 # OSEM_GITHUB_SECRET=5678 +# Snap!Cloud SSO (uses the Discourse SSO protocol) +# The shared secret must match the DISCOURSE_SSO_SECRET configured in Snap!Cloud. +# OSEM_DISCOURSE_KEY can be any non-empty value; it is only used to signal that +# the Discourse provider is enabled (the SSO flow itself only needs the secret). +# OSEM_DISCOURSE_KEY=snap-cloud +# OSEM_DISCOURSE_SECRET=your_shared_secret +# Optionally override the SSO endpoint URL (defaults to https://snap.berkeley.edu/api/v1/discourse-sso) +# OSEM_SNAP_SSO_URL=https://snap.berkeley.edu/api/v1/discourse-sso + # OMNIAUTH Developer KEY/Secret for SUSE/openSUSE # OSEM_SUSE_KEY=1234 # OSEM_SUSE_SECRET=5678 diff --git a/spec/ability/ability_spec.rb b/spec/ability/ability_spec.rb index abbd623f2..25d40c509 100644 --- a/spec/ability/ability_spec.rb +++ b/spec/ability/ability_spec.rb @@ -234,8 +234,14 @@ it { is_expected.not_to be_able_to(:manage, event_unconfirmed) } # TODO-SNAPCON: Debug why this fail after Rails 7 upgrade. - xit { is_expected.to be_able_to(:create, user_event_with_cfp.commercials.new) } - xit { is_expected.to be_able_to(:manage, user_commercial) } + xit 'fails after Rails 7 upgrade' do + expect(subject).to be_able_to(:create, user_event_with_cfp.commercials.new) + end + + xit 'fails after Rails 7 upgrade' do + expect(subject).to be_able_to(:manage, user_commercial) + end + it { is_expected.not_to be_able_to(:manage, commercial_event_unconfirmed) } it { is_expected.to be_able_to(:new, Track.new(program: program_with_call_for_tracks)) } diff --git a/spec/controllers/admin/sponsorship_levels_controller_spec.rb b/spec/controllers/admin/sponsorship_levels_controller_spec.rb index 5d9ef31a3..65ca29ae2 100644 --- a/spec/controllers/admin/sponsorship_levels_controller_spec.rb +++ b/spec/controllers/admin/sponsorship_levels_controller_spec.rb @@ -49,16 +49,16 @@ describe 'POST #create' do context 'saves successfuly' do - before(:each, run: true) do + before(:each, :run) do post :create, params: { sponsorship_level: attributes_for(:sponsorship_level), conference_id: conference.short_title } end - it 'redirects to admin sponsorship_level index path', run: true do + it 'redirects to admin sponsorship_level index path', :run do expect(response).to redirect_to admin_conference_sponsorship_levels_path(conference_id: conference.short_title) end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match('Sponsorship level successfully created.') end @@ -138,15 +138,15 @@ describe 'DELETE #destroy' do context 'deletes successfully' do - before(:each, run: true) do + before(:each, :run) do delete :destroy, params: { conference_id: conference.short_title, id: sponsorship_level.id } end - it 'redirects to admin sponsorship_level index path', run: true do + it 'redirects to admin sponsorship_level index path', :run do expect(response).to redirect_to admin_conference_sponsorship_levels_path(conference_id: conference.short_title) end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match('Sponsorship level successfully deleted.') end diff --git a/spec/controllers/admin/tickets_controller_spec.rb b/spec/controllers/admin/tickets_controller_spec.rb index b29903f61..488ad7d83 100644 --- a/spec/controllers/admin/tickets_controller_spec.rb +++ b/spec/controllers/admin/tickets_controller_spec.rb @@ -50,19 +50,19 @@ describe 'POST #create' do context 'saves successfuly' do - before(:each, run: true) do + before(:each, :run) do post :create, params: { conference_id: conference, ticket: attributes_for(:ticket) } end let!(:ticket_count) { conference.tickets.count } - it 'redirects to index path', run: true do + it 'redirects to index path', :run do expect(response).to redirect_to( admin_conference_tickets_path(conference_id: conference) ) end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match('Ticket successfully created.') end @@ -149,19 +149,19 @@ describe 'DELETE #destroy' do context 'deletes successfully' do - before(:each, run: true) do + before(:each, :run) do delete :destroy, params: { conference_id: conference, id: ticket } end let!(:ticket_count) { conference.tickets.count } - it 'redirects to index path', run: true do + it 'redirects to index path', :run do expect(response).to redirect_to( admin_conference_tickets_path(conference_id: conference) ) end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match('Ticket successfully deleted.') end diff --git a/spec/controllers/conference_registration_controller_spec.rb b/spec/controllers/conference_registration_controller_spec.rb index dfe04003b..3b44c1c57 100644 --- a/spec/controllers/conference_registration_controller_spec.rb +++ b/spec/controllers/conference_registration_controller_spec.rb @@ -378,15 +378,15 @@ end context 'deletes successfully' do - before(:each, run: true) do + before(:each, :run) do delete :destroy, params: { conference_id: conference.short_title } end - it 'redirects to root path', run: true do + it 'redirects to root path', :run do expect(response).to redirect_to root_path end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match("You are not registered for #{conference.title} anymore!") end diff --git a/spec/controllers/proposals_controller_spec.rb b/spec/controllers/proposals_controller_spec.rb index 633b3c650..73ba5628f 100644 --- a/spec/controllers/proposals_controller_spec.rb +++ b/spec/controllers/proposals_controller_spec.rb @@ -56,31 +56,31 @@ end context 'creates proposal successfully' do - before(:each, run: true) do + before(:each, :run) do @new_user = attributes_for(:user) post :create, params: { event: attributes_for(:event, event_type_id: event_type.id), conference_id: conference.short_title, user: @new_user } end - it 'assigns event variable', run: true do + it 'assigns event variable', :run do expect(assigns(:event)).not_to be_nil end - it 'assigns program to event', run: true do + it 'assigns program to event', :run do expect(assigns(:event).program).to eq conference.program end - it 'assigns submitter and speaker to event', run: true do + it 'assigns submitter and speaker to event', :run do expect(assigns(:event).submitter.username).to eq @new_user[:username] expect(assigns(:event).speakers.first.username).to eq @new_user[:username] end - it 'redirects to proposal index path', run: true do + it 'redirects to proposal index path', :run do expect(response).to redirect_to conference_program_proposals_path conference.short_title end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match('Proposal was successfully submitted.') end @@ -94,18 +94,18 @@ end context 'proposal save fails' do - before(:each, run: true) do + before(:each, :run) do allow_any_instance_of(Event).to receive(:save).and_return(false) post :create, params: { event: attributes_for(:event, event_type_id: event_type.id), conference_id: conference.short_title, user: attributes_for(:user) } end - it 'renders new template', run: true do + it 'renders new template', :run do expect(response).to render_template('new') end - it 'shows error in flash message', run: true do + it 'shows error in flash message', :run do expect(flash[:error]).to match("Could not submit proposal: #{event.errors.full_messages.join(', ')}") end @@ -241,29 +241,29 @@ end context 'creates proposal successfully' do - before(:each, run: true) do + before(:each, :run) do post :create, params: { event: attributes_for(:event, event_type_id: event_type.id), conference_id: conference.short_title } end - it 'assigns event variable', run: true do + it 'assigns event variable', :run do expect(assigns(:event)).not_to be_nil end - it 'assigns program to event', run: true do + it 'assigns program to event', :run do expect(assigns(:event).program).to eq conference.program end - it 'assigns submitter and speaker to event', run: true do + it 'assigns submitter and speaker to event', :run do expect(assigns(:event).submitter).to eq event.submitter expect(assigns(:event).speakers.first).to eq event.submitter end - it 'redirects to proposal index path', run: true do + it 'redirects to proposal index path', :run do expect(response).to redirect_to conference_program_proposals_path conference.short_title end - it 'shows success message in flash notice', run: true do + it 'shows success message in flash notice', :run do expect(flash[:notice]).to match('Proposal was successfully submitted.') end @@ -276,17 +276,17 @@ end context 'proposal save fails' do - before(:each, run: true) do + before(:each, :run) do allow_any_instance_of(Event).to receive(:save).and_return(false) post :create, params: { event: attributes_for(:event, event_type_id: event_type.id), conference_id: conference.short_title } end - it 'renders new template', run: true do + it 'renders new template', :run do expect(response).to render_template('new') end - it 'shows error in flash message', run: true do + it 'shows error in flash message', :run do expect(flash[:error]).to match("Could not submit proposal: #{event.errors.full_messages.join(', ')}") end @@ -346,7 +346,7 @@ expect(response).to render_template('edit') end - it 'shows error in flash message', run: true do + it 'shows error in flash message', :run do expect(flash[:error]).to match("Could not update proposal: #{event.errors.full_messages.join(', ')}") end end diff --git a/spec/features/code_of_conduct_spec.rb b/spec/features/code_of_conduct_spec.rb index 633ebe113..d94ad9c73 100644 --- a/spec/features/code_of_conduct_spec.rb +++ b/spec/features/code_of_conduct_spec.rb @@ -56,7 +56,7 @@ expect(page).to have_text(sample_text) end - it 'is included in the splash page', js: true do + it 'is included in the splash page', :js do visit conference_path(conference) click_on 'Code of Conduct' expect(page).to have_text(sample_text) @@ -76,7 +76,7 @@ end end - it 'can be viewed', js: true do + it 'can be viewed', :js do page.find('input#registration_accepted_code_of_conduct') expect(page).to have_text('I have read and accept the Code of Conduct') expect(page).not_to have_text(sample_text) diff --git a/spec/features/commercials_spec.rb b/spec/features/commercials_spec.rb index 8c9899eb8..17b896948 100644 --- a/spec/features/commercials_spec.rb +++ b/spec/features/commercials_spec.rb @@ -17,7 +17,7 @@ sign_in participant end - it 'adds a valid commercial of an event', feature: true, js: true do + it 'adds a valid commercial of an event', :feature, :js do visit edit_conference_program_proposal_path(conference.short_title, event.id) click_link 'Materials' fill_in 'commercial_url', with: 'https://www.youtube.com/watch?v=M9bq_alk-sw' @@ -30,7 +30,7 @@ expect(flash).to eq('Materials were successfully created.') end - it 'updates a commercial of an event', feature: true, js: true do + it 'updates a commercial of an event', :feature, :js do commercial = create(:commercial, commercialable_id: event.id, commercialable_type: 'Event') @@ -50,7 +50,7 @@ expect(commercial.url).to eq('https://www.youtube.com/watch?v=M9bq_alk-sw') end - it 'deletes a commercial of an event', feature: true, js: true do + it 'deletes a commercial of an event', :feature, :js do create(:commercial, commercialable_id: event.id, commercialable_type: 'Event') diff --git a/spec/features/conference_registration_spec.rb b/spec/features/conference_registration_spec.rb index 0d2ad368a..fc625940c 100644 --- a/spec/features/conference_registration_spec.rb +++ b/spec/features/conference_registration_spec.rb @@ -18,7 +18,7 @@ context 'who is already registered' do let!(:registration) { create(:registration, user: participant, conference: conference) } - it 'updates conference registration', feature: true, js: true do + it 'updates conference registration', :feature, :js do visit root_path click_link 'My Registration' expect(page).to have_current_path(conference_conference_registration_path(conference.short_title), @@ -32,7 +32,7 @@ expect(conference.user_registered?(participant)).to be(true) end - it 'unregisters for a conference', feature: true, js: true do + it 'unregisters for a conference', :feature, :js do visit root_path click_link 'My Registration' expect(page).to have_current_path(conference_conference_registration_path(conference.short_title), @@ -48,7 +48,7 @@ end context 'who is not registered' do - it 'registers for a conference', feature: true, js: true do + it 'registers for a conference', :feature, :js do visit root_path click_link 'Register' diff --git a/spec/features/conference_spec.rb b/spec/features/conference_spec.rb index eb00a0799..d98912208 100644 --- a/spec/features/conference_spec.rb +++ b/spec/features/conference_spec.rb @@ -7,7 +7,7 @@ let!(:organization) { create(:organization) } shared_examples 'add and update conference' do - it 'adds a new conference', feature: true, js: true do + it 'adds a new conference', :feature, :js do expected_count = Conference.count + 1 sign_in user @@ -38,7 +38,7 @@ expect(user.has_cached_role?(:organizer, Conference.last)).to be(true) end - it 'update conference', feature: true, js: true do + it 'update conference', :feature, :js do conference = create(:conference) organizer = create(:organizer, resource: conference) @@ -75,7 +75,7 @@ describe 'admin' do let!(:conference) { create(:conference) } - it 'has organization name in menu bar for conference views', feature: true, js: true do + it 'has organization name in menu bar for conference views', :feature, :js do sign_in user visit admin_conference_path(conference.short_title) diff --git a/spec/features/contact_spec.rb b/spec/features/contact_spec.rb index c246271d8..c7c46a49e 100644 --- a/spec/features/contact_spec.rb +++ b/spec/features/contact_spec.rb @@ -29,7 +29,7 @@ sign_in organizer end - context 'editing', feature: true do + context 'editing', :feature do it_behaves_like 'contact field', 'email', 'example@example.com' it_behaves_like 'contact field', 'sponsor_email', 'sponsor@example.com' it_behaves_like 'contact field', 'social_tag', 'example' diff --git a/spec/features/currency_conversions_spec.rb b/spec/features/currency_conversions_spec.rb index 229a7771d..ecc70c9e1 100644 --- a/spec/features/currency_conversions_spec.rb +++ b/spec/features/currency_conversions_spec.rb @@ -21,14 +21,14 @@ conference.tickets.destroy_all end - it 'show error message when adding new currency conversion', feature: true, js: true do + it 'show error message when adding new currency conversion', :feature, :js do visit admin_conference_currency_conversions_path(conference.short_title) click_link 'Add Currency Conversion' page.find('#flash') expect(flash).to eq('No tickets available for this conference. Cannot create or edit currency conversions.') end - it 'show error message when editing a currency conversion', feature: true, js: true do + it 'show error message when editing a currency conversion', :feature, :js do visit admin_conference_currency_conversions_path(conference.short_title) within('table tbody tr:nth-of-type(1) td:nth-of-type(4)') do click_link 'Edit' @@ -37,7 +37,7 @@ expect(flash).to eq('No tickets available for this conference. Cannot create or edit currency conversions.') end - it 'does not show error message when deleting a currency conversion', feature: true, js: true do + it 'does not show error message when deleting a currency conversion', :feature, :js do visit admin_conference_currency_conversions_path(conference.short_title) page.accept_alert do within('table tbody tr:nth-of-type(1) td:nth-of-type(4)') do @@ -53,7 +53,7 @@ end context 'for a conference with tickets' do - it 'add a currency conversion', feature: true, js: true do + it 'add a currency conversion', :feature, :js do visit admin_conference_currency_conversions_path(conference.short_title) click_link 'Add Currency Conversion' select 'EUR', from: 'currency_conversion_to_currency' @@ -69,7 +69,7 @@ end end - it 'edit a currency conversion', feature: true, js: true do + it 'edit a currency conversion', :feature, :js do conference.currency_conversions << create(:currency_conversion) visit admin_conference_currency_conversions_path(conference.short_title) within('table tbody tr:nth-of-type(1) td:nth-of-type(4)') do @@ -88,7 +88,7 @@ end end - it 'Deletes Currency Conversion', feature: true, js: true do + it 'Deletes Currency Conversion', :feature, :js do conference.currency_conversions << create(:currency_conversion) visit admin_conference_currency_conversions_path(conference.short_title) # Remove currency conversion diff --git a/spec/features/difficulty_levels_spec.rb b/spec/features/difficulty_levels_spec.rb index 1c2795488..183c01379 100644 --- a/spec/features/difficulty_levels_spec.rb +++ b/spec/features/difficulty_levels_spec.rb @@ -7,7 +7,7 @@ let!(:organizer) { create(:organizer, resource: conference) } shared_examples 'difficulty levels' do - it 'adds difficulty level', feature: true, js: true do + it 'adds difficulty level', :feature, :js do sign_in organizer visit admin_conference_program_difficulty_levels_path( conference_id: conference.short_title @@ -31,7 +31,7 @@ end end - it 'updates difficulty level', feature: true, js: true do + it 'updates difficulty level', :feature, :js do conference.program.difficulty_levels << create(:difficulty_level) sign_in organizer visit admin_conference_program_difficulty_levels_path( diff --git a/spec/features/email_spec.rb b/spec/features/email_spec.rb index 9885b18d8..e5b4a8553 100644 --- a/spec/features/email_spec.rb +++ b/spec/features/email_spec.rb @@ -7,8 +7,7 @@ let!(:organizer) { create(:organizer, resource: conference) } shared_examples 'email settings' do - it 'updates email settings', - feature: true, js: true do + it 'updates email settings', :feature, :js do expected_count = EmailSettings.count sign_in organizer diff --git a/spec/features/event_types_spec.rb b/spec/features/event_types_spec.rb index 09342050c..5460430cb 100644 --- a/spec/features/event_types_spec.rb +++ b/spec/features/event_types_spec.rb @@ -7,7 +7,7 @@ let!(:organizer) { create(:organizer, resource: conference) } shared_examples 'event types' do - it 'adds and updates event type', feature: true do + it 'adds and updates event type', :feature do sign_in organizer visit admin_conference_program_event_types_path( conference_id: conference.short_title diff --git a/spec/features/lodgings_spec.rb b/spec/features/lodgings_spec.rb index fd797f3c9..90e55e684 100644 --- a/spec/features/lodgings_spec.rb +++ b/spec/features/lodgings_spec.rb @@ -6,7 +6,7 @@ let!(:conference) { create(:conference) } let!(:organizer) { create(:organizer, resource: conference) } - it 'Add a lodging', feature: true, js: true do + it 'Add a lodging', :feature, :js do path = "#{Rails.root}/app/assets/images/rails.png" sign_in organizer @@ -28,7 +28,7 @@ expect(Lodging.count).to eq(1) end - it 'Update a lodging', feature: true, js: true do + it 'Update a lodging', :feature, :js do path = "#{Rails.root}/app/assets/images/rails.png" lodging = create(:lodging, conference: conference) @@ -59,7 +59,7 @@ expect(Lodging.count).to eq(1) end - it 'Delete a lodging', feature: true, js: true do + it 'Delete a lodging', :feature, :js do lodging = create(:lodging, conference: conference) sign_in organizer diff --git a/spec/features/omniauth_spec.rb b/spec/features/omniauth_spec.rb index 4ad7e8ac3..46749b694 100644 --- a/spec/features/omniauth_spec.rb +++ b/spec/features/omniauth_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Openid, js: true, type: :feature do +describe Openid, :js, type: :feature do shared_examples 'sign in with openid' do it 'has option to log in with Google account' do visit '/accounts/sign_in' diff --git a/spec/features/organization_spec.rb b/spec/features/organization_spec.rb index 31ee01d96..5527e0ed6 100644 --- a/spec/features/organization_spec.rb +++ b/spec/features/organization_spec.rb @@ -9,7 +9,7 @@ let(:admin_user) { create(:admin) } shared_examples 'successfully updates an organization' do - it 'updates a exsisting organization', feature: true, js: true do + it 'updates a exsisting organization', :feature, :js do visit edit_admin_organization_path(organization) fill_in 'organization_name', with: 'changed name' @@ -27,7 +27,7 @@ sign_in admin_user end - it 'creates a new organization', feature: true, js: true do + it 'creates a new organization', :feature, :js do visit new_admin_organization_path fill_in 'organization_name', with: 'Organization name' @@ -45,7 +45,7 @@ sign_in organization_admin end - it "can't create new organization", feature: true, js: true do + it "can't create new organization", :feature, :js do visit new_admin_organization_path page.find('#flash') expect(flash).to eq('You are not authorized to access this page.') diff --git a/spec/features/program_spec.rb b/spec/features/program_spec.rb index c9fa98b5f..5fd3cf4e2 100644 --- a/spec/features/program_spec.rb +++ b/spec/features/program_spec.rb @@ -12,7 +12,7 @@ sign_in organizer end - it 'changes rating', feature: true, js: true do + it 'changes rating', :feature, :js do visit admin_conference_program_path(conference.short_title) click_link 'Edit' diff --git a/spec/features/proposals_spec.rb b/spec/features/proposals_spec.rb index d09b72186..942e290a3 100644 --- a/spec/features/proposals_spec.rb +++ b/spec/features/proposals_spec.rb @@ -27,7 +27,7 @@ sign_in organizer end - scenario 'can preview a proposal if it is public', feature: true, js: true do + scenario 'can preview a proposal if it is public', :feature, :js do visit admin_conference_program_event_path(conference.short_title, @event) expect(page).to have_selector(:link_or_button, 'Preview') click_link 'Preview' @@ -35,7 +35,7 @@ ignore_query: true) end - scenario 'cannot preview a proposal if it is not public', feature: true, js: true do + scenario 'cannot preview a proposal if it is not public', :feature, :js do event = create(:event, program: conference.program, title: 'Example Proposal') event.public = false event.save! @@ -43,7 +43,7 @@ expect(page).not_to have_selector(:link_or_button, 'Preview') end - scenario 'adds a proposal', feature: true, js: true do + scenario 'adds a proposal', :feature, :js do visit admin_conference_program_events_path(conference.short_title) click_on 'Add Event' fill_in 'Title', with: 'Organizer-Created Proposal' @@ -52,7 +52,7 @@ expect(flash).to eq('Event was successfully submitted.') end - scenario 'rejects a proposal', feature: true, js: true do + scenario 'rejects a proposal', :feature, :js do visit admin_conference_program_events_path(conference.short_title) expect(page).to have_content 'Example Proposal' @@ -63,7 +63,7 @@ expect(@event.state).to eq('rejected') end - it 'accepts a proposal', feature: true, js: true do + it 'accepts a proposal', :feature, :js do visit admin_conference_program_events_path(conference.short_title) expect(page).to have_content 'Example Proposal' @@ -75,7 +75,7 @@ expect(@event.state).to eq('unconfirmed') end - scenario 'restarts review of a proposal', feature: true, js: true do + scenario 'restarts review of a proposal', :feature, :js do @event.reject!(@options) visit admin_conference_program_events_path(conference.short_title) expect(page).to have_content 'Example Proposal' @@ -93,7 +93,7 @@ @event.accept!(@options) end - scenario 'not signed_in user submits proposal', feature: true, js: true do + scenario 'not signed_in user submits proposal', :feature, :js do expected_count_event = Event.count + 1 expected_count_user = User.count + 1 @@ -136,7 +136,7 @@ expect(page).to have_content 'Proposal Information' end - scenario 'update a proposal', js: true do + scenario 'update a proposal', :js do conference = create(:conference) create(:track, program: conference.program, name: 'Example Track', @@ -161,7 +161,7 @@ expect(page).to have_content 'Proposal was successfully updated.' end - it 'signed_in user submits a valid proposal', feature: true, js: true do + it 'signed_in user submits a valid proposal', :feature, :js do sign_in participant_without_bio expected_count = Event.count + 1 @@ -193,7 +193,7 @@ expect(Event.count).to eq(expected_count) end - it 'confirms a proposal', feature: true, js: true do + it 'confirms a proposal', :feature, :js do sign_in participant visit conference_program_proposals_path(conference.short_title) expect(page).to have_content 'Example Proposal' @@ -206,7 +206,7 @@ expect(@event.state).to eq('confirmed') end - it 'withdraw a proposal', feature: true, js: true do + it 'withdraw a proposal', :feature, :js do sign_in participant @event.confirm! visit conference_program_proposals_path(conference.short_title) @@ -219,7 +219,7 @@ expect(@event.state).to eq('withdrawn') end - it 'can reset to text template', feature: true, js: true do + it 'can reset to text template', :feature, :js do event_type = conference.program.event_types[-1] event_type.description = 'Example event description' event_type.submission_template = '## Fill Me In!' @@ -252,18 +252,18 @@ @registration = conference.register_user(participant) end - xit 'for a scheduled event, can add an event to google calendar if signed in', feature: true do + xit 'for a scheduled event, can add an event to google calendar if signed in', :feature do sign_in participant visit conference_program_proposal_path(conference.short_title, @scheduled_event1.id) expect(page).to have_content('Google Calendar') end - xit 'for a scheduled event, cannot add an event to google calendar if not signed on', feature: true do + xit 'for a scheduled event, cannot add an event to google calendar if not signed on', :feature do visit conference_program_proposal_path(conference.short_title, @scheduled_event1.id) expect(page).not_to have_content('Google Calendar') end - context 'for events where you join the room via a link', feature: true do + context 'for events where you join the room via a link', :feature do before do sign_in participant end diff --git a/spec/features/registration_periods_spec.rb b/spec/features/registration_periods_spec.rb index 1b6b4a901..d79db22e5 100644 --- a/spec/features/registration_periods_spec.rb +++ b/spec/features/registration_periods_spec.rb @@ -16,7 +16,7 @@ click_link 'New Registration Period' end - it 'requires start date and end date', feature: true do + it 'requires start date and end date', :feature do visit admin_conference_registration_period_path(conference_id: conference) click_link 'New Registration Period' @@ -32,7 +32,7 @@ create(:registration_ticket, conference: conference) end - it 'creates registration period', feature: true, js: true do + it 'creates registration period', :feature, :js do page .execute_script("$('#registration-period-start-datepicker').val('" + "#{start_date.strftime('%d/%m/%Y')}')") @@ -55,7 +55,7 @@ end context 'without tickets' do - it 'creates registration period', feature: true, js: true do + it 'creates registration period', :feature, :js do page .execute_script("$('#registration-period-start-datepicker').val('" + "#{start_date.strftime('%d/%m/%Y')}')") diff --git a/spec/features/roles_spec.rb b/spec/features/roles_spec.rb index dff041316..74a09e8b8 100644 --- a/spec/features/roles_spec.rb +++ b/spec/features/roles_spec.rb @@ -16,7 +16,7 @@ visit admin_conference_roles_path(conference.short_title) end - it "role #{role_name}", feature: true, js: true do + it "role #{role_name}", :feature, :js do click_link('Edit', href: edit_admin_conference_role_path(conference.short_title, role_name)) fill_in 'role_description', with: 'changed description' click_button 'Update Role' @@ -55,7 +55,7 @@ visit admin_conference_roles_path(conference.short_title) end - it "adds role #{role_name}", feature: true, js: true do + it "adds role #{role_name}", :feature, :js do click_link('Users', href: admin_conference_role_path(conference.short_title, role_name)) fill_in 'user_email', with: user_with_no_role.email @@ -65,7 +65,7 @@ expect(user_with_no_role.has_cached_role?(role.name, conference)).to be true end - it "removes role #{role_name}", feature: true, js: true do + it "removes role #{role_name}", :feature, :js do click_link('Users', href: admin_conference_role_path(conference.short_title, role_name)) bootstrap_switch = find('tr', text: user_with_role.name).find('.bootstrap-switch-container') @@ -91,13 +91,13 @@ visit admin_conference_roles_path(conference.short_title) end - it "add role #{role_name}", feature: true, js: true do + it "add role #{role_name}", :feature, :js do click_link('Users', href: admin_conference_role_path(conference.short_title, role_name)) expect(page.has_field?('user_email')).to be false end - it "remove role #{role_name}", feature: true, js: true do + it "remove role #{role_name}", :feature, :js do click_link('Users', href: admin_conference_role_path(conference.short_title, role_name)) expect(first('td').has_css?('.bootstrap-switch-container')).to be false diff --git a/spec/features/rooms_spec.rb b/spec/features/rooms_spec.rb index 5a84c0c8c..6d46b29a7 100644 --- a/spec/features/rooms_spec.rb +++ b/spec/features/rooms_spec.rb @@ -8,7 +8,7 @@ let!(:organizer) { create(:organizer, resource: conference) } shared_examples 'rooms' do - it 'adds a room', feature: true, js: true do + it 'adds a room', :feature, :js do sign_in organizer visit admin_conference_venue_rooms_path( conference_id: conference.short_title @@ -32,7 +32,7 @@ end end - it 'updates a room', feature: true, js: true do + it 'updates a room', :feature, :js do room = create(:room, venue: venue) sign_in organizer visit edit_admin_conference_venue_room_path( diff --git a/spec/features/splashpage_spec.rb b/spec/features/splashpage_spec.rb index ed8ce86bf..7d0ce6638 100644 --- a/spec/features/splashpage_spec.rb +++ b/spec/features/splashpage_spec.rb @@ -8,7 +8,7 @@ let!(:organizer) { create(:organizer, resource: conference) } let!(:participant) { create(:user, biography: '', is_admin: false) } - it 'create a valid splashpage', js: true do + it 'create a valid splashpage', :js do sign_in organizer visit admin_conference_splashpage_path(conference.short_title) @@ -23,7 +23,7 @@ context 'splashpage already created' do let!(:splashpage) { create(:splashpage, conference: conference, public: false) } - it 'update a valid splashpage', js: true do + it 'update a valid splashpage', :js do sign_in organizer visit admin_conference_splashpage_path(conference.short_title) @@ -39,7 +39,7 @@ expect(page.has_checked_field?('Make splash page public?')).to be true end - it 'delete the splashpage', js: true do + it 'delete the splashpage', :js do sign_in organizer visit admin_conference_splashpage_path(conference.short_title) click_link 'Delete' @@ -71,7 +71,7 @@ context 'multiple organizations' do let!(:additional_organization) { create(:organization) } - it 'has organization logo', feature: true, js: true do + it 'has organization logo', :feature, :js do sign_in participant visit conference_path(conference.short_title) @@ -80,7 +80,7 @@ end end - context 'happening now section', feature: true, js: true do + context 'happening now section', :feature, :js do let!(:conference2) do create(:full_conference, start_date: 1.day.ago, end_date: 7.days.from_now, start_hour: 0, end_hour: 24) end @@ -188,13 +188,13 @@ let!(:reg_ticket) { create(:ticket, registration_ticket: true, conference: conference) } let!(:free_ticket) { create(:ticket, price_cents: 0) } - it 'user signed in with no tickets', feature: true do + it 'user signed in with no tickets', :feature do sign_in participant visit conference_path(conference.short_title) expect(page).to have_content 'You have not booked any tickets for this conference yet.' end - it 'user signed in with 1 free ticket', feature: true do + it 'user signed in with 1 free ticket', :feature do sign_in participant create(:ticket_purchase, conference: conference, user: participant, ticket: free_ticket, quantity: 1) visit conference_path(conference.short_title) @@ -202,14 +202,14 @@ end # TODO-SNAPCON: This should check for reg tickets, not just any ticket. - it 'user signed in with 1 paid ticket', feature: true do + it 'user signed in with 1 paid ticket', :feature do sign_in participant create(:ticket_purchase, conference: conference, user: participant, ticket: reg_ticket, quantity: 1) visit conference_path(conference.short_title) expect(page).not_to have_content 'You have not booked any tickets for this conference yet.' end - it 'user signed in with multiple ticket', feature: true do + it 'user signed in with multiple ticket', :feature do sign_in participant create(:ticket_purchase, conference: conference, user: participant, ticket: reg_ticket, quantity: 1) create(:ticket_purchase, conference: conference, user: participant, ticket: free_ticket, quantity: 1) @@ -217,7 +217,7 @@ expect(page).not_to have_content 'You have not booked any tickets for this conference yet.' end - it 'user not signed in', feature: true do + it 'user not signed in', :feature do visit conference_path(conference.short_title) expect(page).not_to have_content 'You have not booked any tickets for this conference yet.' end diff --git a/spec/features/sponsor_spec.rb b/spec/features/sponsor_spec.rb index 7f7277cea..b5b46decb 100644 --- a/spec/features/sponsor_spec.rb +++ b/spec/features/sponsor_spec.rb @@ -7,7 +7,7 @@ let!(:organizer) { create(:organizer, resource: conference) } shared_examples 'sponsors' do - it 'adds and updates sponsors', feature: true, js: true do + it 'adds and updates sponsors', :feature, :js do path = "#{Rails.root}/app/assets/images/rails.png" conference.sponsorship_levels << create(:sponsorship_level, conference: conference) diff --git a/spec/features/sponsorship_level_spec.rb b/spec/features/sponsorship_level_spec.rb index cb2803ce3..6160d590a 100644 --- a/spec/features/sponsorship_level_spec.rb +++ b/spec/features/sponsorship_level_spec.rb @@ -7,7 +7,7 @@ let!(:organizer) { create(:organizer, resource: conference) } shared_examples 'sponsorship_levels' do - it 'adds a sponsorship level', feature: true, js: true do + it 'adds a sponsorship level', :feature, :js do sign_in organizer visit admin_conference_sponsorship_levels_path( conference_id: conference.short_title @@ -30,7 +30,7 @@ end end - it 'updates a sponsorship level', feature: true, js: true do + it 'updates a sponsorship level', :feature, :js do level = create(:sponsorship_level, conference_id: conference.id) sign_in organizer visit edit_admin_conference_sponsorship_level_path( diff --git a/spec/features/surveys_spec.rb b/spec/features/surveys_spec.rb index d80ae263f..4b0149c9d 100644 --- a/spec/features/surveys_spec.rb +++ b/spec/features/surveys_spec.rb @@ -12,7 +12,7 @@ sign_in organizer end - it 'create a survey', feature: true, js: true do + it 'create a survey', :feature, :js do visit admin_conference_path(conference) click_link 'Surveys' click_link 'New' @@ -34,7 +34,7 @@ sign_in attendee end - it 'respond to a survey during registration', feature: true, js: true do + it 'respond to a survey during registration', :feature, :js do create(:registration_period, conference: conference) create(:registration, conference: conference, user: attendee) survey = create(:survey, surveyable: conference, target: :during_registration) diff --git a/spec/features/ticket_purchases_spec.rb b/spec/features/ticket_purchases_spec.rb index 32bb9fd1f..1d7aebb50 100644 --- a/spec/features/ticket_purchases_spec.rb +++ b/spec/features/ticket_purchases_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Registration, feature: true, js: true do +describe Registration, :feature, :js do let!(:ticket) { create(:ticket) } let!(:free_ticket) { create(:ticket, price_cents: 0) } let!(:first_registration_ticket) { create(:registration_ticket, price_cents: 0) } @@ -70,7 +70,7 @@ def make_failed_stripe_purchase end end - it 'purchases ticket but payment fails', feature: true, js: true do + it 'purchases ticket but payment fails', :feature, :js do visit root_path click_link 'Register' @@ -205,13 +205,13 @@ def make_failed_stripe_purchase click_button 'Register' end - it 'selects a ticket in EUR', feature: true, js: true do + it 'selects a ticket in EUR', :feature, :js do select 'EUR', from: 'currency_selector' fill_in "tickets__#{third_registration_ticket.id}", with: '1' expect(page).to have_content('17.80') end - it 'switches between EUR and GBP', feature: true, js: true do + it 'switches between EUR and GBP', :feature, :js do select 'EUR', from: 'currency_selector' fill_in "tickets__#{third_registration_ticket.id}", with: '1' expect(page).to have_content('17.80') @@ -219,7 +219,7 @@ def make_failed_stripe_purchase expect(page).to have_content('7.50') end - it 'sees the correct currency symbol after changing the currency in tickets', feature: true, js: true do + it 'sees the correct currency symbol after changing the currency in tickets', :feature, :js do select 'EUR', from: 'currency_selector' expect(page).to have_content('€') select 'GBP', from: 'currency_selector' diff --git a/spec/features/tickets_spec.rb b/spec/features/tickets_spec.rb index ec3847c3c..1c3777f41 100644 --- a/spec/features/tickets_spec.rb +++ b/spec/features/tickets_spec.rb @@ -15,7 +15,7 @@ sign_out end - it 'add a valid ticket', feature: true do + it 'add a valid ticket', :feature do visit admin_conference_tickets_path(conference.short_title) click_link 'Add Ticket' @@ -29,7 +29,7 @@ expect(Ticket.count).to eq(2) end - it 'add a invalid ticket', feature: true do + it 'add a invalid ticket', :feature do visit admin_conference_tickets_path(conference.short_title) click_link 'Add Ticket' @@ -42,7 +42,7 @@ expect(Ticket.count).to eq(1) end - it 'add a hidden ticket', feature: true do + it 'add a hidden ticket', :feature do visit admin_conference_tickets_path(conference.short_title) click_link 'Add Ticket' @@ -61,7 +61,7 @@ context 'Ticket already created' do let!(:ticket) { create(:ticket, title: 'Business Ticket', price: 100, conference_id: conference.id) } - it 'edit valid ticket', feature: true do + it 'edit valid ticket', :feature do visit admin_conference_tickets_path(conference.short_title) click_link('Edit', href: edit_admin_conference_ticket_path(conference.short_title, ticket.id)) @@ -83,7 +83,7 @@ expect(Ticket.count).to eq(2) end - it 'edit invalid ticket', feature: true do + it 'edit invalid ticket', :feature do visit admin_conference_tickets_path(conference.short_title) click_link('Edit', href: edit_admin_conference_ticket_path(conference.short_title, ticket.id)) @@ -101,7 +101,7 @@ expect(Ticket.count).to eq(2) end - it 'delete ticket', feature: true, js: true do + it 'delete ticket', :feature, :js do visit admin_conference_tickets_path(conference.short_title) click_link('Delete', href: admin_conference_ticket_path(conference.short_title, ticket.id)) page.accept_alert diff --git a/spec/features/tracks_spec.rb b/spec/features/tracks_spec.rb index 5311443c3..4b5504281 100644 --- a/spec/features/tracks_spec.rb +++ b/spec/features/tracks_spec.rb @@ -8,7 +8,7 @@ let(:user) { create(:user) } shared_examples 'admin tracks' do - it 'adds a track', feature: true, js: true do + it 'adds a track', :feature, :js do sign_in organizer expected = expect do @@ -28,7 +28,7 @@ end end - it 'deletes a track', feature: true, js: true do + it 'deletes a track', :feature, :js do track = create(:track, program_id: conference.program.id) sign_in organizer @@ -44,7 +44,7 @@ expect(Track.count).to eq(0) end - it 'updates a track', feature: true, js: true do + it 'updates a track', :feature, :js do create(:track, program_id: conference.program.id) sign_in organizer @@ -70,7 +70,7 @@ end shared_examples 'non admin tracks' do - it 'adds a track', feature: true, js: true do + it 'adds a track', :feature, :js do sign_in user expected = expect do @@ -93,7 +93,7 @@ end end - it 'withdraws a track', feature: true, js: true do + it 'withdraws a track', :feature, :js do track = create(:track, :self_organized, program_id: conference.program.id, submitter: user) sign_in user @@ -114,7 +114,7 @@ end end - it 'updates a track', feature: true, js: true do + it 'updates a track', :feature, :js do create(:track, :self_organized, program_id: conference.program.id, submitter: user) sign_in user diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index a6bb12161..c5fadd27b 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -7,7 +7,7 @@ let!(:user) { create(:user) } shared_examples 'admin ability' do - scenario 'edits a user', feature: true, js: true do + scenario 'edits a user', :feature, :js do visit admin_users_path wait_for_ajax within "tr#user_#{user.id}" do diff --git a/spec/features/versions_spec.rb b/spec/features/versions_spec.rb index 861abcf08..ff5e9e0a1 100644 --- a/spec/features/versions_spec.rb +++ b/spec/features/versions_spec.rb @@ -13,7 +13,7 @@ sign_in organizer end - it 'display changes in contact', feature: true, versioning: true, js: true do + it 'display changes in contact', :feature, :versioning, :js do visit edit_admin_conference_contact_path(conference.short_title) fill_in 'contact_email', with: 'example@example.com' fill_in 'contact_sponsor_email', with: 'sponsor@example.com' @@ -25,7 +25,7 @@ expect(page).to have_text("#{organizer.name} updated social tag, email, googleplus and sponsor email of contact details in conference #{conference.short_title}") end - it 'display changes in program', feature: true, versioning: true, js: true do + it 'display changes in program', :feature, :versioning, :js do visit edit_admin_conference_program_path(conference.short_title) fill_in 'program_rating', with: '4' click_button 'Update Program' @@ -34,7 +34,7 @@ expect(page).to have_text("#{organizer.name} updated rating of program in conference #{conference.short_title}") end - it 'display changes in cfp', feature: true, versioning: true, js: true do + it 'display changes in cfp', :feature, :versioning, :js do cfp.update(start_date: (Date.today + 1).strftime('%d/%m/%Y'), end_date: (Date.today + 3).strftime('%d/%m/%Y')) cfp_id = cfp.id @@ -46,7 +46,7 @@ expect(page).to have_text("Someone (probably via the console) deleted cfp for events with ID #{cfp_id} in conference #{conference.short_title}") end - it 'display changes in registration_period', feature: true, versioning: true, js: true do + it 'display changes in registration_period', :feature, :versioning, :js do registration_period = create(:registration_period, conference: conference) registration_period.update(start_date: (Date.today + 1).strftime('%d/%m/%Y'), end_date: (Date.today + 3).strftime('%d/%m/%Y')) @@ -59,7 +59,7 @@ expect(page).to have_text("Someone (probably via the console) deleted registration period with ID #{registration_period_id} in conference #{conference.short_title}") end - it 'display changes in conference', feature: true, versioning: true, js: true do + it 'display changes in conference', :feature, :versioning, :js do new_conference = create(:conference, title: 'Test Conference') organizer.add_role :organizer, new_conference new_conference.update(title: 'New Con', short_title: 'NewCon') @@ -72,7 +72,7 @@ expect(page).to have_text('Someone (probably via the console) updated title and short title of conference NewCon') end - it 'display changes in event_type', feature: true, versioning: true, js: true do + it 'display changes in event_type', :feature, :versioning, :js do event_type = create(:event_type, program: conference.program, name: 'Discussion') event_type.update(length: 90, maximum_abstract_length: 10_000) event_type_id = event_type.id @@ -84,7 +84,7 @@ expect(page).to have_text("Someone (probably via the console) deleted event type Discussion with ID #{event_type_id} in conference #{conference.short_title}") end - it 'display changes in lodging', feature: true, versioning: true, js: true do + it 'display changes in lodging', :feature, :versioning, :js do lodging = create(:lodging, conference: conference, name: 'Hotel XYZ') lodging.update(description: 'Nice view,close to venue', website_link: 'http://www.example.com') lodging_id = lodging.id @@ -96,7 +96,7 @@ expect(page).to have_text("Someone (probably via the console) deleted lodging Hotel XYZ with ID #{lodging_id} in conference #{conference.short_title}") end - it 'display changes in conference role', feature: true, versioning: true, js: true do + it 'display changes in conference role', :feature, :versioning, :js do visit edit_admin_conference_role_path(conference.short_title, 'cfp') fill_in 'role_description', with: 'For the members of the call for papers team' click_button 'Update Role' @@ -105,7 +105,7 @@ expect(page).to have_text("#{organizer.name} updated description of role cfp in conference #{conference.short_title}") end - it 'display changes in room', feature: true, versioning: true, js: true do + it 'display changes in room', :feature, :versioning, :js do venue = create(:venue, conference: conference) room = create(:room, venue: venue, name: 'Auditorium') room.update_attribute(:size, 120) @@ -118,7 +118,7 @@ expect(page).to have_text("Someone (probably via the console) deleted room Auditorium with ID #{room_id} in conference #{conference.short_title}") end - it 'display changes in sponsor', feature: true, versioning: true, js: true do + it 'display changes in sponsor', :feature, :versioning, :js do conference.sponsorship_levels << create_list(:sponsorship_level, 2, conference: conference) sponsor = create(:sponsor, conference: conference, name: 'SUSE', sponsorship_level: conference.sponsorship_levels.first) @@ -133,7 +133,7 @@ expect(page).to have_text("Someone (probably via the console) deleted sponsor SUSE with ID #{sponsor_id} in conference #{conference.short_title}") end - it 'display changes in sponsorship_level', feature: true, versioning: true, js: true do + it 'display changes in sponsorship_level', :feature, :versioning, :js do sponsorship_level = create(:sponsorship_level, conference: conference) sponsorship_level.update_attribute(:title, 'Gold') sponsorship_level_id = sponsorship_level.id @@ -145,7 +145,7 @@ expect(page).to have_text("Someone (probably via the console) deleted sponsorship level Gold with ID #{sponsorship_level_id} in conference #{conference.short_title}") end - it 'display changes in ticket', feature: true, versioning: true, js: true do + it 'display changes in ticket', :feature, :versioning, :js do ticket = create(:ticket, conference: conference, title: 'Gold') ticket.update(price: 50, description: 'Premium Ticket') ticket_id = ticket.id @@ -157,7 +157,7 @@ expect(page).to have_text("Someone (probably via the console) deleted ticket Gold with ID #{ticket_id} in conference #{conference.short_title}") end - it 'display changes in track', feature: true, versioning: true, js: true do + it 'display changes in track', :feature, :versioning, :js do track = create(:track, program: conference.program, name: 'Distribution') track.update_attribute(:description, 'Events about Linux distributions') track_id = track.id @@ -169,7 +169,7 @@ expect(page).to have_text("Someone (probably via the console) deleted track Distribution with ID #{track_id} in conference #{conference.short_title}") end - it 'display changes in venue', feature: true, versioning: true, js: true do + it 'display changes in venue', :feature, :versioning, :js do venue = create(:venue, conference: conference, name: 'Example University') venue.update(website: 'www.example.com new', description: 'Just another beautiful venue') venue_id = venue.id @@ -181,7 +181,7 @@ expect(page).to have_text("Someone (probably via the console) deleted venue Example University with ID #{venue_id} in conference #{conference.short_title}") end - xit 'display changes in event', feature: true, versioning: true, js: true do + xit 'display changes in event', :feature, :versioning, :js do visit new_conference_program_proposal_path(conference_id: conference.short_title) fill_in 'event_title', with: 'ABC' fill_in 'event_abstract', with: 'Lorem ipsum abstract' @@ -223,7 +223,7 @@ expect(page).to have_text("#{organizer.name} canceled event ABC in conference #{conference.short_title}") end - it 'display changes in difficulty levels', feature: true, versioning: true, js: true do + it 'display changes in difficulty levels', :feature, :versioning, :js do difficulty_level = create(:difficulty_level, program: conference.program, title: 'Expert') difficulty_level.update_attribute(:description, 'Only for Experts') difficulty_level_id = difficulty_level.id @@ -235,7 +235,7 @@ expect(page).to have_text("Someone (probably via the console) deleted difficulty level Expert with ID #{difficulty_level_id} in conference #{conference.short_title}") end - it 'display changes in splashpages', feature: true, versioning: true, js: true do + it 'display changes in splashpages', :feature, :versioning, :js do visit admin_conference_splashpage_path(conference.short_title) click_link 'Create Splashpage' click_button 'Save' @@ -262,7 +262,7 @@ expect(page).to have_text("#{organizer.name} deleted splashpage with ID #{splashpage_id} in conference #{conference.short_title}") end - it 'displays users subscribe/unsubscribe to conferences', feature: true, versioning: true, js: true do + it 'displays users subscribe/unsubscribe to conferences', :feature, :versioning, :js do visit root_path click_link 'Subscribe' click_link 'Unsubscribe' @@ -276,7 +276,7 @@ expect(page).to have_text("Someone (probably via the console) unsubscribed #{organizer.name} from conference #{conference.short_title}") end - it 'display changes in conference commercials', feature: true, versioning: true, js: true do + it 'display changes in conference commercials', :feature, :versioning, :js do conference_commercial = create(:conference_commercial, commercialable: conference) conference_commercial.update_attribute(:url, 'https://www.youtube.com/watch?v=VNkDJk5_9eU') conference_commercial.destroy @@ -287,7 +287,7 @@ expect(page).to have_text("Someone (probably via the console) deleted commercial in conference #{conference.short_title}") end - it 'display changes in event commercials', feature: true, versioning: true, js: true do + it 'display changes in event commercials', :feature, :versioning, :js do event_commercial event_commercial.update_attribute(:url, 'https://www.youtube.com/watch?v=VNkDJk5_9eU') event_commercial.destroy @@ -298,7 +298,7 @@ expect(page).to have_text("Someone (probably via the console) deleted commercial in event #{event_with_commercial.title} in conference #{conference.short_title}") end - it 'display changes in event commercials in event history', feature: true, versioning: true, js: true do + it 'display changes in event commercials in event history', :feature, :versioning, :js do event_without_commercial = create(:event, program: conference.program) event_commercial @@ -311,7 +311,7 @@ expect(page).to have_no_text('Someone (probably via the console) created new commercial') end - it 'display changes in organization', feature: true, versioning: true, js: true do + it 'display changes in organization', :feature, :versioning, :js do admin = create(:admin) sign_in admin @@ -323,7 +323,7 @@ expect(page).to have_text('created new organization New org') end - context 'organization role', feature: true, versioning: true, js: true do + context 'organization role', :feature, :versioning, :js do let!(:organization_admin) { create(:organization_admin, organization: conference.organization) } let!(:user) { create(:user) } @@ -346,7 +346,7 @@ end end - it 'display changes in users_role for conference role', feature: true, versioning: true, js: true do + it 'display changes in users_role for conference role', :feature, :versioning, :js do user = create(:user) role = Role.find_by(name: 'cfp', resource_id: conference.id, resource_type: 'Conference') user.add_role :cfp, conference @@ -358,7 +358,7 @@ expect(page).to have_text("removed role cfp with ID #{user_role.id} from user #{user.name} in conference #{conference.short_title}") end - it 'display changes in email settings', feature: true, versioning: true, js: true do + it 'display changes in email settings', :feature, :versioning, :js do conference.email_settings.update(registration_subject: 'xxxxx', registration_body: 'yyyyy', accepted_subject: 'zzzzz') @@ -366,7 +366,7 @@ expect(page).to have_text("Someone (probably via the console) updated registration body, registration subject and accepted subject of email settings in conference #{conference.short_title}") end - it 'display changes in conference registrations', feature: true, versioning: true, js: true do + it 'display changes in conference registrations', :feature, :versioning, :js do Registration.create(user: organizer, conference: conference) Registration.last.destroy @@ -375,7 +375,7 @@ expect(page).to have_text("Someone (probably via the console) unregistered #{organizer.name} from conference #{conference.short_title}") end - it 'display changes in event registration', feature: true, versioning: true, js: true do + it 'display changes in event registration', :feature, :versioning, :js do create(:event, program: conference.program, title: 'My first event') registration = Registration.create(user: organizer, conference: conference) event = create(:event, program: conference.program, title: 'My second event') @@ -391,7 +391,7 @@ expect(page).to have_text("Someone (probably via the console) unregistered #{organizer.name} from event #{event.title} in conference #{conference.short_title}") end - it 'display changes in comment', feature: true, versioning: true, js: true do + it 'display changes in comment', :feature, :versioning, :js do create(:event, program: conference.program, title: 'My first event') event = create(:event, program: conference.program, title: 'My second event') visit admin_conference_program_event_path(conference_id: conference.short_title, id: event.id) @@ -408,7 +408,7 @@ expect(page).to have_text("Someone (probably via the console) re-added #{organizer.name}'s comment on event #{event.title} in conference #{conference.short_title}") end - it 'display changes in vote', feature: true, versioning: true, js: true do + it 'display changes in vote', :feature, :versioning, :js do conference.program.rating = 1 create(:event, program: conference.program, title: 'My first event') event = create(:event, program: conference.program, title: 'My second event') @@ -422,7 +422,7 @@ expect(page).to have_text("Someone (probably via the console) re-added #{organizer.name}'s vote on event #{event.title} in conference #{conference.short_title}") end - it 'display password reset requests', feature: true, versioning: true, js: true do + it 'display password reset requests', :feature, :versioning, :js do user = create(:user) user.send_reset_password_instructions @@ -430,14 +430,14 @@ expect(page).to have_text("Someone requested password reset of user #{user.name}") end - it 'display user signups', feature: true, versioning: true, js: true do + it 'display user signups', :feature, :versioning, :js do create(:user, name: 'testname') visit admin_revision_history_path expect(page).to have_text('testname signed up') end - it 'display updates to user', feature: true, versioning: true, js: true do + it 'display updates to user', :feature, :versioning, :js do user = create(:user) user.update(nickname: 'testnick', affiliation: 'openSUSE') diff --git a/spec/features/voting_spec.rb b/spec/features/voting_spec.rb index 1758de0bd..32a829dbf 100644 --- a/spec/features/voting_spec.rb +++ b/spec/features/voting_spec.rb @@ -48,7 +48,7 @@ def cast_vote(rating, before:, after:) conference.program.update_attribute :rating, 5 end - scenario 'multiple users casting votes', feature: true, js: true do + scenario 'multiple users casting votes', :feature, :js do sign_in voter1 cast_vote 3, before: 0, after: 3 sign_out diff --git a/spec/support/login_macros.rb b/spec/support/login_macros.rb index 7557c14df..962375124 100644 --- a/spec/support/login_macros.rb +++ b/spec/support/login_macros.rb @@ -2,6 +2,7 @@ module LoginMacros include Warden::Test::Helpers + Warden.test_mode! def sign_in(user) diff --git a/spec/support/omniauth_macros.rb b/spec/support/omniauth_macros.rb index 7cc704a73..ecf9588cd 100644 --- a/spec/support/omniauth_macros.rb +++ b/spec/support/omniauth_macros.rb @@ -12,7 +12,7 @@ module OmniauthMacros ENV['OSEM_SUSE_SECRET'] = 'test secret suse' ENV['OSEM_GITHUB_KEY'] = 'test key github' ENV['OSEM_GITHUB_SECRET'] = 'test secret github' - ENV['OSEM_DISCOURSE_KEY'] = 'test key discourse' + ENV['OSEM_DISCOURSE_KEY'] = 'snap-cloud' ENV['OSEM_DISCOURSE_SECRET'] = 'test secret discourse' def mock_auth_new_user diff --git a/spec/support/save_feature_failures.rb b/spec/support/save_feature_failures.rb index 66aa399f8..c05fbeddc 100644 --- a/spec/support/save_feature_failures.rb +++ b/spec/support/save_feature_failures.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +# rubocop:disable Lint/Debugger RSpec.configure do |config| config.after(:each, type: :feature) do example_filename = RSpec.current_example.full_description @@ -17,3 +18,4 @@ end end end +# rubocop:enable Lint/Debugger