Bump rspec
This commit is contained in:
parent
44d4f11262
commit
5bcf812646
4 changed files with 21 additions and 19 deletions
2
Gemfile
2
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
|
||||
|
|
|
|||
24
Gemfile.lock
24
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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
<test_default_entity>
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue