Skip to content

Commit bcf9ef7

Browse files
committed
Fix ORM spec compatibility
1 parent 78f45ad commit bcf9ef7

4 files changed

Lines changed: 29 additions & 21 deletions

File tree

.rubocop_gradual.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
[60, 1, 17, "Gemspec/DevelopmentDependencies: Specify development dependencies in gemspec.", 439084949],
1212
[61, 1, 16, "Gemspec/DevelopmentDependencies: Specify development dependencies in gemspec.", 772204622]
1313
],
14-
"Rakefile:3129391770": [
14+
"Rakefile:1268173106": [
1515
[179, 45, 1, "Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call.", 177545],
1616
[187, 66, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545],
17-
[212, 3, 20, "Rake/DuplicateTask: Task `default` is defined at both Rakefile:61 and Rakefile:212.", 318045076]
17+
[227, 3, 20, "Rake/DuplicateTask: Task `default` is defined at both Rakefile:61 and Rakefile:227.", 318045076]
1818
],
1919
"lib/omniauth/identity/model.rb:1195696065": [
2020
[182, 27, 32, "Lint/SymbolConversion: Unnecessary symbol conversion; use `:\"#{self.class.auth_key}=\"` instead.", 3072009762]
@@ -25,19 +25,19 @@
2525
"lib/omniauth/strategies/identity.rb:2260468599": [
2626
[232, 29, 1, "Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call.", 177545]
2727
],
28-
"spec/omniauth/identity/models/active_record_spec.rb:2707226605": [
29-
[21, 130, 1, "Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call.", 177545],
30-
[45, 31, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
28+
"spec/omniauth/identity/models/active_record_spec.rb:1234912842": [
29+
[23, 130, 1, "Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call.", 177545],
30+
[47, 31, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
3131
],
32-
"spec/omniauth/identity/models/couch_potato_module_spec.rb:1858981563": [
33-
[41, 37, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
32+
"spec/omniauth/identity/models/couch_potato_module_spec.rb:4058643040": [
33+
[42, 37, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
3434
],
35-
"spec/omniauth/identity/models/mongoid_spec.rb:1471553923": [
36-
[30, 37, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
35+
"spec/omniauth/identity/models/mongoid_spec.rb:1626561410": [
36+
[34, 37, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
3737
],
38-
"spec/omniauth/identity/models/no_brainer_spec.rb:3640455838": [
39-
[27, 30, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545],
40-
[55, 37, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
38+
"spec/omniauth/identity/models/no_brainer_spec.rb:2371136555": [
39+
[34, 32, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545],
40+
[62, 39, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
4141
],
4242
"spec/omniauth/strategies/identity_spec.rb:654570549": [
4343
[19, 128, 1, "Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call.", 177545],
@@ -51,7 +51,7 @@
5151
[347, 31, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545],
5252
[370, 14, 1, "Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.", 177545]
5353
],
54-
"spec/spec_helper.rb:549093387": [
54+
"spec/spec_helper.rb:457633016": [
5555
[39, 4, 52, "Style/YodaCondition: Reverse the order of the operands `VersionGem::Ruby::RUBY_VER < Gem::Version.new(\"2.5\")`.", 3054081885]
5656
],
5757
"spec/support/shared_contexts/instance_with_instance_methods.rb:540999892": [

spec/omniauth/identity/models/active_record_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class TestIdentity < OmniAuth::Identity::Models::ActiveRecord; end
1414

1515
RSpec.describe(OmniAuth::Identity::Models::ActiveRecord, :sqlite3) do
1616
describe "model", type: :model do
17-
subject(:model_klass) do
17+
subject(:model_definition) { -> { model_klass } }
18+
19+
let(:model_klass) do
1820
AnonymousActiveRecord.generate(
1921
parent_klass: "OmniAuth::Identity::Models::ActiveRecord",
2022
columns: OmniAuth::Identity::Model::SCHEMA_ATTRIBUTES | %w[provider password_digest],

spec/omniauth/identity/models/mongoid_spec.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313

1414
RSpec.describe(OmniAuth::Identity::Models::Mongoid, :mongodb) do
1515
describe "model", type: :model do
16-
subject(:model_klass) { MongoidTestIdentity }
16+
subject(:model_definition) { -> { model_klass } }
1717

18-
it { is_expected.to(be_mongoid_document) }
18+
let(:model_klass) { MongoidTestIdentity }
19+
20+
it "is a Mongoid document" do
21+
expect(model_klass).to(be_mongoid_document)
22+
end
1923

2024
it "does not munge collection name" do
21-
expect(subject).to(be_stored_in(database: "db1", collection: "mongoid_test_identities", client: "default"))
25+
expect(model_klass).to(be_stored_in(database: "db1", collection: "mongoid_test_identities", client: "default"))
2226
end
2327

2428
include_context "with persistable model"

spec/omniauth/identity/secure_password_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ def has_secure_password
6868
end
6969

7070
it "tracks minimum bcrypt cost configuration" do
71-
described_class.min_cost = true
72-
expect(described_class.min_cost).to be(true)
73-
ensure
74-
described_class.min_cost = false
71+
begin
72+
described_class.min_cost = true
73+
expect(described_class.min_cost).to be(true)
74+
ensure
75+
described_class.min_cost = false
76+
end
7577
end
7678
end

0 commit comments

Comments
 (0)