Skip to content

Commit

Permalink
Fix(test): Pass the option as a keyword argument to go with Ruby 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbotaq committed Apr 2, 2021
1 parent 61a6baa commit f0b1a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/associations/active_record_extensions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Book < ActiveRecord::Base
it "doesn't raise any exception when the belongs_to association class can't be autoloaded" do
# Simulate autoloader
allow_any_instance_of(String).to receive(:constantize).and_raise(LoadError, "Unable to autoload constant NonExistent")
expect { School.belongs_to :city, {class_name: 'NonExistent'} }.not_to raise_error
expect { School.belongs_to :city, class_name: 'NonExistent' }.not_to raise_error
end
end

Expand Down

0 comments on commit f0b1a9f

Please sign in to comment.