Use ancestors' `hash_including` if available. #323

Merged
merged 1 commit into from Oct 30, 2013

Conversation

Projects
None yet
2 participants
@tamird
Contributor

tamird commented Oct 30, 2013

The previous solution didn't work because rspec does a complicated dance
with module inclusion and inheritence, so we must check this condition
at call-time, rather than include-time.

@bblimke sorry about this, we had not tested this thoroughly enough the first time. Hopefully nobody has been bitten yet. cc @strongriley

@bblimke

This comment has been minimized.

Show comment Hide comment
@bblimke

bblimke Oct 30, 2013

Owner

No problem, I yanked 1.15.1. It would be good to add spec for this scenario though.

Owner

bblimke commented Oct 30, 2013

No problem, I yanked 1.15.1. It would be good to add spec for this scenario though.

@tamird

This comment has been minimized.

Show comment Hide comment
@tamird

tamird Oct 30, 2013

Contributor

Agreed. Are there any existing specs that deal with the interaction between rspec and webmock?

Contributor

tamird commented Oct 30, 2013

Agreed. Are there any existing specs that deal with the interaction between rspec and webmock?

@bblimke

This comment has been minimized.

Show comment Hide comment
@bblimke

bblimke Oct 30, 2013

Owner

There are examples testing hash_including in spec/acceptance/shared/stubbing_requests.rb and spec/acceptance/shared/request_expectations.rb.
Test for usage of hash_including outside RSpec, is in test/shared_test.rb.

Current specs/test don't test splats though.

Owner

bblimke commented Oct 30, 2013

There are examples testing hash_including in spec/acceptance/shared/stubbing_requests.rb and spec/acceptance/shared/request_expectations.rb.
Test for usage of hash_including outside RSpec, is in test/shared_test.rb.

Current specs/test don't test splats though.

Use ancestors' `hash_including` if available.
The previous solution didn't work because rspec does a complicated dance
with module inclusion and inheritence, so we must check this condition
at call-time, rather than include-time.
@tamird

This comment has been minimized.

Show comment Hide comment
@tamird

tamird Oct 30, 2013

Contributor

@bblimke added spec, PTAL

Contributor

tamird commented Oct 30, 2013

@bblimke added spec, PTAL

bblimke added a commit that referenced this pull request Oct 30, 2013

Merge pull request #323 from tamird/fix-hash_including
Use ancestors' `hash_including` if available.

@bblimke bblimke merged commit 3ce30bc into bblimke:master Oct 30, 2013

1 check failed

default The Travis CI build failed
Details
@bblimke

This comment has been minimized.

Show comment Hide comment
@bblimke

bblimke Oct 30, 2013

Owner

include_spec.rb doesn't work in Ruby 1.8

Owner

bblimke commented Oct 30, 2013

include_spec.rb doesn't work in Ruby 1.8

@tamird

This comment has been minimized.

Show comment Hide comment
@tamird

tamird Oct 30, 2013

Contributor

on it

Contributor

tamird commented Oct 30, 2013

on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment