diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index ea45cf4..655a4ee 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -14,10 +14,10 @@ jobs: - name: Install RuboCop run: | gem install bundler --no-document - gem install rubocop -v 1.78.0 --no-document - gem install rubocop-packaging -v 0.5.2 --no-document + gem install rubocop -v 1.85.1 --no-document + gem install rubocop-packaging -v 0.6 --no-document gem install rubocop-rails -v 2.32.0 --no-document - gem install rubocop-rspec -v 3.2.0 --no-document - gem install rubocop-rspec_rails -v 2.30.0 --no-document + gem install rubocop-rspec -v 3.9 --no-document + gem install rubocop-rspec_rails -v 2.32 --no-document - name: RuboCop run: rubocop diff --git a/.rubocop.yml b/.rubocop.yml index 1c3f83f..9a38ed5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,4 @@ -require: +plugins: - rubocop-packaging - rubocop-rails - rubocop-rspec @@ -7,27 +7,27 @@ require: AllCops: TargetRubyVersion: 3.2 Exclude: - - 'filterameter.gemspec' - - 'gemfiles/*.gemfile' - - 'Rakefile' - - 'spec/dummy/bin/**/*' - - 'spec/dummy/db/schema.rb' - - 'spec/dummy/config.ru' - - 'spec/dummy/config/**/*' + - "filterameter.gemspec" + - "gemfiles/*.gemfile" + - "Rakefile" + - "spec/dummy/bin/**/*" + - "spec/dummy/db/schema.rb" + - "spec/dummy/config.ru" + - "spec/dummy/config/**/*" NewCops: enable Metrics/BlockLength: Exclude: - - 'spec/**/*' - - 'Guardfile' + - "spec/**/*" + - "Guardfile" AllowedMethods: - - 'class_methods' + - "class_methods" Layout/LineLength: Max: 120 Style/FrozenStringLiteralComment: Exclude: - - 'spec/dummy/db/**/*' + - "spec/dummy/db/**/*" Style/HashSyntax: EnforcedShorthandSyntax: either RSpec/MultipleExpectations: Exclude: - - 'spec/requests/*' + - "spec/requests/*" diff --git a/Gemfile.lock b/Gemfile.lock index b59ce96..a9e60f2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,29 +7,31 @@ PATH GEM remote: https://gem.coop/ specs: - actioncable (8.0.3) - actionpack (= 8.0.3) - activesupport (= 8.0.3) + action_text-trix (2.1.16) + railties + actioncable (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.3) - actionpack (= 8.0.3) - activejob (= 8.0.3) - activerecord (= 8.0.3) - activestorage (= 8.0.3) - activesupport (= 8.0.3) + actionmailbox (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) - actionmailer (8.0.3) - actionpack (= 8.0.3) - actionview (= 8.0.3) - activejob (= 8.0.3) - activesupport (= 8.0.3) + actionmailer (8.1.2) + actionpack (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.3) - actionview (= 8.0.3) - activesupport (= 8.0.3) + actionpack (8.1.2) + actionview (= 8.1.2) + activesupport (= 8.1.2) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -37,91 +39,102 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.3) - actionpack (= 8.0.3) - activerecord (= 8.0.3) - activestorage (= 8.0.3) - activesupport (= 8.0.3) + actiontext (8.1.2) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.3) - activesupport (= 8.0.3) + actionview (8.1.2) + activesupport (= 8.1.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.3) - activesupport (= 8.0.3) + activejob (8.1.2) + activesupport (= 8.1.2) globalid (>= 0.3.6) - activemodel (8.0.3) - activesupport (= 8.0.3) - activerecord (8.0.3) - activemodel (= 8.0.3) - activesupport (= 8.0.3) + activemodel (8.1.2) + activesupport (= 8.1.2) + activerecord (8.1.2) + activemodel (= 8.1.2) + activesupport (= 8.1.2) timeout (>= 0.4.0) - activestorage (8.0.3) - actionpack (= 8.0.3) - activejob (= 8.0.3) - activerecord (= 8.0.3) - activesupport (= 8.0.3) + activestorage (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activesupport (= 8.1.2) marcel (~> 1.0) - activesupport (8.0.3) + activesupport (8.1.2) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) appraisal (2.5.0) bundler rake thor (>= 0.14.0) ast (2.4.3) base64 (0.3.0) - benchmark (0.4.1) - bigdecimal (3.3.1) + bigdecimal (4.0.1) builder (3.3.0) - concurrent-ruby (1.3.5) - connection_pool (2.5.4) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) crass (1.0.6) - date (3.4.1) + date (3.5.1) diff-lcs (1.6.2) docile (1.4.1) drb (2.2.3) - erb (5.1.1) + erb (6.0.2) erubi (1.13.1) globalid (1.3.0) activesupport (>= 6.1) - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - io-console (0.8.1) - irb (1.15.2) + io-console (0.8.2) + irb (1.17.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.15.1) + json (2.19.0) + json-schema (6.2.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) - loofah (2.24.1) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp marcel (1.1.0) + mcp (0.8.0) + json-schema (>= 4.1) mini_mime (1.1.5) mini_portile2 (2.8.9) - minitest (5.26.0) - net-imap (0.5.12) + minitest (6.0.2) + drb (~> 2.0) + prism (~> 1.5) + net-imap (0.6.3) date net-protocol net-pop (0.1.2) @@ -130,12 +143,14 @@ GEM timeout net-smtp (0.5.1) net-protocol - nio4r (2.7.4) + nio4r (2.7.5) nokogiri (1.19.1) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.19.1-arm64-darwin) + racc (~> 1.4) parallel (1.27.0) - parser (3.3.9.0) + parser (3.3.10.2) ast (~> 2.4.1) racc pg (1.6.3) @@ -143,10 +158,11 @@ GEM pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.6.0) - psych (5.2.6) + prism (1.9.0) + psych (5.3.1) date stringio + public_suffix (7.0.5) racc (1.8.1) rack (3.2.5) rack-session (2.1.1) @@ -154,32 +170,32 @@ GEM rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) + rackup (2.3.1) rack (>= 3) - rails (8.0.3) - actioncable (= 8.0.3) - actionmailbox (= 8.0.3) - actionmailer (= 8.0.3) - actionpack (= 8.0.3) - actiontext (= 8.0.3) - actionview (= 8.0.3) - activejob (= 8.0.3) - activemodel (= 8.0.3) - activerecord (= 8.0.3) - activestorage (= 8.0.3) - activesupport (= 8.0.3) + rails (8.1.2) + actioncable (= 8.1.2) + actionmailbox (= 8.1.2) + actionmailer (= 8.1.2) + actionpack (= 8.1.2) + actiontext (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activemodel (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) bundler (>= 1.15.0) - railties (= 8.0.3) + railties (= 8.1.2) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.0.3) - actionpack (= 8.0.3) - activesupport (= 8.0.3) + railties (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -187,20 +203,20 @@ GEM tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.0) - rdoc (6.15.0) + rake (13.3.1) + rdoc (7.2.0) erb psych (>= 4.0.0) tsort regexp_parser (2.11.3) - reline (0.6.2) + reline (0.6.3) io-console (~> 0.5) rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.6) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (7.1.1) @@ -211,34 +227,38 @@ GEM rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.6) - rubocop (1.81.1) + rspec-support (3.13.7) + rubocop (1.85.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.47.1, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.47.1) + rubocop-ast (1.49.0) parser (>= 3.3.7.2) - prism (~> 1.4) - rubocop-packaging (0.5.2) - rubocop (>= 1.33, < 2.0) - rubocop-rails (2.33.4) + prism (~> 1.7) + rubocop-packaging (0.6.0) + lint_roller (~> 1.1.0) + rubocop (>= 1.72.1, < 2.0) + rubocop-rails (2.34.3) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0) - rubocop-rspec (3.2.0) - rubocop (~> 1.61) - rubocop-rspec_rails (2.30.0) - rubocop (~> 1.61) - rubocop-rspec (~> 3, >= 3.0.1) + 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-progressbar (1.13.0) securerandom (0.4.1) simplecov (0.22.0) @@ -250,22 +270,22 @@ GEM sqlite3 (2.9.1) mini_portile2 (~> 2.8.0) sqlite3 (2.9.1-arm64-darwin) - stringio (3.1.7) - thor (1.4.0) - timeout (0.4.3) + stringio (3.2.0) + thor (1.5.0) + timeout (0.6.0) tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) - uri (1.0.4) + unicode-emoji (4.2.0) + uri (1.1.1) useragent (0.16.11) websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.7.3) + zeitwerk (2.7.5) PLATFORMS arm64-darwin-24 @@ -277,10 +297,10 @@ DEPENDENCIES pg (~> 1.6.3) rspec-rails (~> 7.0) rubocop (~> 1.64) - rubocop-packaging (~> 0.5.2) + rubocop-packaging (~> 0.6) rubocop-rails (~> 2.25) - rubocop-rspec (~> 3.2.0) - rubocop-rspec_rails (~> 2.30.0) + rubocop-rspec (~> 3.9) + rubocop-rspec_rails (~> 2.32) simplecov (~> 0.18) sqlite3 (~> 2.9.1) diff --git a/filterameter.gemspec b/filterameter.gemspec index 8dbd553..dc06761 100644 --- a/filterameter.gemspec +++ b/filterameter.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency "appraisal", "~> 2.5.0" spec.add_development_dependency "rspec-rails", "~> 7.0" spec.add_development_dependency "rubocop", "~> 1.64" - spec.add_development_dependency "rubocop-packaging", "~> 0.5.2" + spec.add_development_dependency "rubocop-packaging", "~> 0.6" spec.add_development_dependency "rubocop-rails", "~> 2.25" - spec.add_development_dependency "rubocop-rspec", "~> 3.2.0" - spec.add_development_dependency "rubocop-rspec_rails", "~> 2.30.0" + spec.add_development_dependency "rubocop-rspec", "~> 3.9" + spec.add_development_dependency "rubocop-rspec_rails", "~> 2.32" spec.add_development_dependency "simplecov", "~> 0.18" end diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index b0c5e82..c49ecca 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -18,7 +18,7 @@ module Dummy class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 5.2 + config.load_defaults 7.2 # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers @@ -31,4 +31,3 @@ class Application < Rails::Application config.api_only = true end end - diff --git a/spec/filterameter/parameters_base_spec.rb b/spec/filterameter/parameters_base_spec.rb index 342e1a8..cbf1978 100644 --- a/spec/filterameter/parameters_base_spec.rb +++ b/spec/filterameter/parameters_base_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Filterameter::ParametersBase do let(:parameters) do Class.new(described_class).tap do |pc| - pc.add_validation(:size, [inclusion: { in: %w[Small Medium Large] }]) + pc.add_validation(:size, [{ inclusion: { in: %w[Small Medium Large] } }]) pc.add_validation(:percent_reduced, [{ numericality: { greater_than: 0 } }, { numericality: { less_than: 100 } }]) end.new({}) diff --git a/spec/fixtures/activity_members.yml b/spec/fixtures/activity_members.yml index 7a0d463..f332aee 100644 --- a/spec/fixtures/activity_members.yml +++ b/spec/fixtures/activity_members.yml @@ -5,16 +5,15 @@ breakfast_toast: breakfast_juice: activity: good_breakfast user: juice_guy - + breakfast_chef: activity: good_breakfast user: egg_chef - exercise_steph: - activity: lace_up_running_shoes - user: step + activity: go_for_a_run + user: steph exercise_klay: - activity: lace_up_running_shoes + activity: go_for_a_run user: klay diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index c06628e..aad4e22 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -11,12 +11,14 @@ begin ActiveRecord::Migration.maintain_test_schema! rescue ActiveRecord::PendingMigrationError => e - puts e.to_s.strip + puts e.to_s.strip # rubocop:disable RSpec/Output exit 1 end RSpec.configure do |config| config.fixture_path = 'spec/fixtures' + config.use_transactional_fixtures = true + config.global_fixtures = :all config.infer_spec_type_from_file_location! config.filter_rails_from_backtrace! end diff --git a/spec/requests/attribute_filters_spec.rb b/spec/requests/attribute_filters_spec.rb index df66f86..9634c0b 100644 --- a/spec/requests/attribute_filters_spec.rb +++ b/spec/requests/attribute_filters_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Attribute filters' do - fixtures :activities, :users, :tasks - context 'with no options' do before { get '/activities', params: { filter: { activity_manager_id: users(:joe_jackson).id } } } @@ -39,7 +37,6 @@ end context 'with validations' do - fixtures :projects before { get '/projects', params: { filter: { priority: 'high' } } } it 'returns the correct number of rows' do @@ -54,8 +51,6 @@ end context 'with validations and invalid value' do - fixtures :projects - it 'raises validation error' do expect { get '/projects', params: { filter: { priority: 'top' } } } .to raise_exception(Filterameter::Exceptions::ValidationError) diff --git a/spec/requests/attribute_sorts_spec.rb b/spec/requests/attribute_sorts_spec.rb index ffa1ffe..6d7de38 100644 --- a/spec/requests/attribute_sorts_spec.rb +++ b/spec/requests/attribute_sorts_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Attribute sorts' do - fixtures :projects, :activities, :users, :tasks - context 'with filter declaration' do before { get '/activities', params: { filter: { sort: :activity_manager_id } } } diff --git a/spec/requests/controller_overrides_spec.rb b/spec/requests/controller_overrides_spec.rb index 8d7b654..8b482c3 100644 --- a/spec/requests/controller_overrides_spec.rb +++ b/spec/requests/controller_overrides_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Controller overrides' do - fixtures :projects, :activities - context 'with nested key overridden' do before { get '/legacy_projects', params: { criteria: { priority: 'high' } } } @@ -34,8 +32,6 @@ end context 'with filter_parameters overridden' do - fixtures :tasks - before { get '/active_tasks', params: { filter: { activity_id: activities(:good_breakfast).id } } } it 'returns the correct number of rows' do diff --git a/spec/requests/default_sorts_spec.rb b/spec/requests/default_sorts_spec.rb index fb1b722..7e0269f 100644 --- a/spec/requests/default_sorts_spec.rb +++ b/spec/requests/default_sorts_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Default sorts' do - fixtures :projects, :activities - context 'with no default specified' do before { get '/projects' } diff --git a/spec/requests/filter_key_configuration_spec.rb b/spec/requests/filter_key_configuration_spec.rb index 00fcf46..d6a803e 100644 --- a/spec/requests/filter_key_configuration_spec.rb +++ b/spec/requests/filter_key_configuration_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Filter Key configuration' do - fixtures :activities - before { allow(Filterameter).to receive(:configuration).and_return(custom_config) } context 'with key overriden to f' do diff --git a/spec/requests/multi_level_nested_attribute_filters_spec.rb b/spec/requests/multi_level_nested_attribute_filters_spec.rb index b7b799b..91768f7 100644 --- a/spec/requests/multi_level_nested_attribute_filters_spec.rb +++ b/spec/requests/multi_level_nested_attribute_filters_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Multi-level nested attribute filters' do - fixtures :projects, :activities, :tasks, :users, :activity_members - context 'with singular-to-singular association' do before { get '/tasks', params: { filter: { project_priority: 'high' } } } diff --git a/spec/requests/multi_level_nested_scope_filters_spec.rb b/spec/requests/multi_level_nested_scope_filters_spec.rb index 42831b7..83b2eaf 100644 --- a/spec/requests/multi_level_nested_scope_filters_spec.rb +++ b/spec/requests/multi_level_nested_scope_filters_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Nested scope filters' do - fixtures :projects, :activities, :tasks, :users, :activity_members - context 'with singular-to-singular association' do before { get '/tasks', params: { filter: { low_priority_projects: 'low' } } } diff --git a/spec/requests/nested_filters_spec.rb b/spec/requests/nested_filters_spec.rb index b461e7f..f407a9f 100644 --- a/spec/requests/nested_filters_spec.rb +++ b/spec/requests/nested_filters_spec.rb @@ -4,8 +4,6 @@ RSpec.describe 'Nested filters' do describe 'attribute filters' do - fixtures :projects, :activities, :tasks - context 'with singular association' do before { get '/activities', params: { filter: { project_priority: 'high' } } } @@ -36,8 +34,6 @@ end describe 'scope filters' do - fixtures :projects, :activities, :tasks - context 'with singular association' do before { get '/activities', params: { filter: { high_priority: 'true' } } } diff --git a/spec/requests/partial_filters_spec.rb b/spec/requests/partial_filters_spec.rb index 623707c..627b6e2 100644 --- a/spec/requests/partial_filters_spec.rb +++ b/spec/requests/partial_filters_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Partial filters' do - fixtures :tasks - context 'with defaults' do before { get '/tasks', params: { filter: { description: 'beans' } } } diff --git a/spec/requests/range_filters_spec.rb b/spec/requests/range_filters_spec.rb index b36d3cd..cb338a3 100644 --- a/spec/requests/range_filters_spec.rb +++ b/spec/requests/range_filters_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Range filters' do - fixtures :activities - context 'when range: true' do context 'with exact value' do before { get '/activities', params: { filter: { task_count: 3 } } } diff --git a/spec/requests/scope_filters_spec.rb b/spec/requests/scope_filters_spec.rb index 86d7541..fe07bbf 100644 --- a/spec/requests/scope_filters_spec.rb +++ b/spec/requests/scope_filters_spec.rb @@ -4,8 +4,6 @@ RSpec.describe 'Scope filters' do context 'when conditional' do - fixtures :activities, :users - context 'when true' do before { get '/activities', params: { filter: { incomplete: true } } } @@ -54,8 +52,6 @@ end context 'with arguments' do - fixtures :projects - before { get '/projects', params: { filter: { in_progress: 1.day.from_now } } } it 'returns the correct number of rows' do diff --git a/spec/requests/scope_sorts_spec.rb b/spec/requests/scope_sorts_spec.rb index 6e7ab3f..827c152 100644 --- a/spec/requests/scope_sorts_spec.rb +++ b/spec/requests/scope_sorts_spec.rb @@ -3,8 +3,6 @@ require 'rails_helper' RSpec.describe 'Scope sorts' do - fixtures :projects - context 'with class method scope' do before { get '/projects', params: { filter: { sort: :by_created_at } } }