diff --git a/Gemfile b/Gemfile index ac4dcae..2599680 100644 --- a/Gemfile +++ b/Gemfile @@ -56,6 +56,6 @@ group :development, :test do gem "rake" # unit tests - gem "rspec", "~> 3.11.0" + gem "rspec", "~> 3.12.0" gem "rspec-rails", "~> 5.1.2" end diff --git a/Gemfile.lock b/Gemfile.lock index e73d3ed..424fd66 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -142,21 +142,21 @@ GEM ffi (~> 1.0) regexp_parser (2.8.1) rexml (3.2.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) rspec-collection_matchers (1.2.0) rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-json_expectations (2.2.0) - rspec-mocks (3.11.1) + rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-rails (5.1.2) actionpack (>= 5.2) activesupport (>= 5.2) @@ -165,7 +165,7 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.11.0) + rspec-support (3.12.0) rubocop (1.52.0) json (~> 2.3) parallel (~> 1.10) @@ -234,7 +234,7 @@ DEPENDENCIES pry pry-byebug rake - rspec (~> 3.11.0) + rspec (~> 3.12.0) rspec-collection_matchers (~> 1.2.0) rspec-json_expectations (~> 2.1) rspec-rails (~> 5.1.2) diff --git a/spec/lib/diaspora_federation/entities/relayable_spec.rb b/spec/lib/diaspora_federation/entities/relayable_spec.rb index 1bcf51a..d143264 100644 --- a/spec/lib/diaspora_federation/entities/relayable_spec.rb +++ b/spec/lib/diaspora_federation/entities/relayable_spec.rb @@ -474,7 +474,7 @@ module DiasporaFederation parent: remote_parent }.merge("new_property" => new_property), %w[author guid parent_guid new_property property], - "new_property" => new_property + {"new_property" => new_property} ).and_call_original Entities::SomeRelayable.from_hash(entity_data, property_order) end diff --git a/spec/lib/diaspora_federation/entity_spec.rb b/spec/lib/diaspora_federation/entity_spec.rb index 60b33b9..45071c9 100644 --- a/spec/lib/diaspora_federation/entity_spec.rb +++ b/spec/lib/diaspora_federation/entity_spec.rb @@ -200,9 +200,11 @@ module DiasporaFederation it "calls .from_hash with the hash representation of provided XML" do expect(Entities::TestDefaultEntity).to receive(:from_hash).with( - test1: "asdf", - test2: "qwer", - test3: true + { + test1: "asdf", + test2: "qwer", + test3: true + } ) Entities::TestDefaultEntity.from_xml(Nokogiri::XML(<<~XML).root) @@ -340,7 +342,7 @@ module DiasporaFederation } expect(Entities::TestEntity).to receive(:json_parser_class).and_call_original expect_any_instance_of(Parsers::JsonParser).to receive(:parse).with(json).and_call_original - expect(Entities::TestEntity).to receive(:from_hash).with(test: "value") + expect(Entities::TestEntity).to receive(:from_hash).with({test: "value"}) Entities::TestEntity.from_json(json) end @@ -388,7 +390,7 @@ module DiasporaFederation it "calls a constructor of the entity of the appropriate type" do entity_data = {test1: "abc", test2: "123"} - expect(Entities::TestDefaultEntity).to receive(:new).with(test1: "abc", test2: "123") + expect(Entities::TestDefaultEntity).to receive(:new).with({test1: "abc", test2: "123"}) Entities::TestDefaultEntity.from_hash(entity_data) end