`have` matcher deprecations (in 2.99) doesn't get categorized properly by rspec-core's deprecation logic #348

Closed
myronmarston opened this Issue Nov 4, 2013 · 7 comments

Projects

None yet

3 participants

@myronmarston
Member

Working on upgrading a project and I got this output:

`expect(collection).to have(3).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/traffic/traffic_social_channels_spec.rb:75:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(3).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/raw_data_inserters/insert_raw_facebook_account_summaries_spec.rb:28:in `block (3 levels) in <module:ShardCreation>'.
`expect(collection).to have(3).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/raw_data_inserters/insert_raw_facebook_account_summaries_spec.rb:28:in `block (3 levels) in <module:ShardCreation>'.
Too many uses of deprecated '`expect(collection).to have(3).items`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(1).job` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/jobs/monthly_scheduler_spec.rb:73:in `block (4 levels) in <top (required)>'.
`expect(collection).to have(1).job` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/packrat_integration_spec.rb:212:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(1).job` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/packrat_integration_spec.rb:212:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`expect(collection).to have(1).job`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(1).thing` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/traffic/insert_traffic_engines_deltas_spec.rb:56:in `block (5 levels) in <module:ShardCreation>'.
`expect(collection).to have(1).thing` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/traffic/insert_traffic_engines_deltas_spec.rb:87:in `block (5 levels) in <module:ShardCreation>'.
`expect(collection).to have(1).thing` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/traffic/insert_traffic_keywords_deltas_spec.rb:101:in `block (6 levels) in <module:ShardCreation>'.
Too many uses of deprecated '`expect(collection).to have(1).thing`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(2).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:168:in `block (2 levels) in <top (required)>'.
`expect(collection).to have(2).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:129:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(2).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_summary_spec.rb:120:in `block (2 levels) in <module:EndpointModels>'.
Too many uses of deprecated '`expect(collection).to have(2).things`'. Set config.deprecation_stream to a File for full output.
`be_true` is deprecated. Use `be_truthy` (for Ruby's conditional semantics) or `be true` (for exact `== true` equality) instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:169:in `block (2 levels) in <top (required)>'.
`be_true` is deprecated. Use `be_truthy` (for Ruby's conditional semantics) or `be true` (for exact `== true` equality) instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/top_pages_detail_spec.rb:47:in `block (5 levels) in <module:EndpointModels>'.
`be_true` is deprecated. Use `be_truthy` (for Ruby's conditional semantics) or `be true` (for exact `== true` equality) instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/top_pages_detail_spec.rb:47:in `block (5 levels) in <module:EndpointModels>'.
Too many uses of deprecated '`be_true`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(4).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(4)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:121:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(4).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(4)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/profile_overview_spec.rb:62:in `block (3 levels) in <module:EndpointModels>'.
`expect(collection).to have(4).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(4)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/profile_overview_spec.rb:52:in `block (3 levels) in <module:EndpointModels>'.
Too many uses of deprecated '`expect(collection).to have(4).things`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(1).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:137:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(1).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/traffic/traffic_summaries_spec.rb:220:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(1).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/traffic/traffic_summaries_spec.rb:127:in `block (4 levels) in <module:EndpointModels>'.
Too many uses of deprecated '`expect(collection).to have(1).things`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(10).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(10)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:106:in `block (2 levels) in <top (required)>'.
`expect(collection).to have(10).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(10)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:104:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(5).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(5)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_metrics_spec.rb:107:in `block (2 levels) in <top (required)>'.
`expect(collection).to have(5).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(5)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/traffic/traffic_urls_spec.rb:59:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(5).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(5)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/traffic/traffic_urls_spec.rb:102:in `block (4 levels) in <module:EndpointModels>'.
Too many uses of deprecated '`expect(collection).to have(5).things`'. Set config.deprecation_stream to a File for full output.
`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or `be false` (for exact `== false` equality) instead. Called from /Users/myron/moz/vanguard/spec/integration/models/timed_out_collection_occurrence_spec.rb:68:in `block (3 levels) in <top (required)>'.
`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or `be false` (for exact `== false` equality) instead. Called from /Users/myron/moz/vanguard/spec/integration/models/timed_out_collection_occurrence_spec.rb:62:in `block (3 levels) in <top (required)>'.
`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or `be false` (for exact `== false` equality) instead. Called from /Users/myron/moz/vanguard/spec/integration/apps/pro_home_spec.rb:160:in `block (3 levels) in <module:Apps>'.
Too many uses of deprecated '`be_false`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(3).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/top_links_spec.rb:65:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(3).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/top_links_spec.rb:66:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(3).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:80:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`expect(collection).to have(3).things`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(0).jobs` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/packrat_integration_spec.rb:245:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(0).jobs` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/packrat_integration_spec.rb:246:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(1).jid` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/packrat_integration_spec.rb:311:in `block (4 levels) in <top (required)>'.
`expect(collection).to have(1).jid` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/packrat_integration_spec.rb:311:in `block (4 levels) in <top (required)>'.
`expect(collection).to have(1).jid` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/start_rush_collection_spec.rb:25:in `block (3 levels) in <module:ShardCreation>'.
`expect(collection).to have(2).jobs` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/jobs/check_for_new_lsapi_index_spec.rb:116:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(2).jobs` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/jobs/check_for_new_lsapi_index_spec.rb:109:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(2).elements` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/links/profile_overview_spec.rb:27:in `block (2 levels) in <module:EndpointModels>'.
`expect(collection).to have(8).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(8)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/calculate_facebook_account_summaries_spec.rb:229:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have(8).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(8)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/calculate_facebook_account_summaries_spec.rb:229:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have(8).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(8)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/calculate_facebook_account_summaries_spec.rb:80:in `block (4 levels) in <module:ShardCreation>'.
Too many uses of deprecated '`expect(collection).to have(8).items`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(21).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(21)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:175:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(120).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(120)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:130:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(120).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(120)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:112:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(130).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(130)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:121:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(12).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(12)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:148:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(12).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(12)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:159:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(12).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(12)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_history_spec.rb:183:in `block (3 levels) in <module:EndpointModels>'.
Too many uses of deprecated '`expect(collection).to have(12).things`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(39).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(39)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_aggregates_spec.rb:188:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(2).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/campaign/campaign_metadata_updater_spec.rb:102:in `block (3 levels) in <module:EndpointModels>'.
`expect(collection).to have(2).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(2)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:96:in `block (3 levels) in <top (required)>'.
`expect(collection).to have_at_least(2).urls` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to be >= 2` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation_spec.rb:98:in `block (2 levels) in <top (required)>'.
`expect(collection).to have(0).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_history_spec.rb:151:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(0).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_history_spec.rb:172:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(0).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/collection_occurrence_spec.rb:50:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`expect(collection).to have(0).things`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(5).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(5)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/insert_engagement_counts_spec.rb:68:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have(5).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(5)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/insert_engagement_counts_spec.rb:68:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have(5).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(5)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:91:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`expect(collection).to have(5).items`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(19).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(19)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_page_issues_spec.rb:80:in `block (2 levels) in <module:EndpointModels>'.
`expect(collection).to have(19).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(19)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_page_issues_report_spec.rb:82:in `block (2 levels) in <module:EndpointModels>'.
`expect(collection).to have(7).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(7)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_page_issues_spec.rb:83:in `block (2 levels) in <module:EndpointModels>'.
`expect(collection).to have(7).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(7)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/crawl/crawl_page_issues_report_spec.rb:85:in `block (2 levels) in <module:EndpointModels>'.
`expect(collection).to have(1).item` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:103:in `block (2 levels) in <top (required)>'.
`expect(collection).to have(1).item` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:74:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(1).item` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:75:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`expect(collection).to have(1).item`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(6).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(6)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:85:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(6).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(6)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/social/raw_data_inserters/insert_raw_engagements_spec.rb:26:in `block (2 levels) in <module:ShardCreation>'.
`expect(collection).to have(1).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/mentions/mentions_post_spec.rb:90:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(1).items` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/start_rush_collection_spec.rb:89:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have_at_least(1).serp` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to be >= 1` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/rankings/insert_all_rankings_spec.rb:65:in `delete_rankings_for_vertical_from'.
`expect(collection).to have(1).row` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/insert_shard_info_spec.rb:12:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have(1).row` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/insert_shard_info_spec.rb:12:in `block (4 levels) in <module:ShardCreation>'.
`expect(collection).to have(1).vertical` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/traffic/traffic_keywords_spec.rb:188:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(1).vertical` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(1)` instead. Called from /Users/myron/moz/vanguard/spec/integration/endpoint_models/traffic/keyword_sending_visits_detail_spec.rb:204:in `block (4 levels) in <module:EndpointModels>'.
`expect(collection).to have(20).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(20)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/completed_job_spec.rb:90:in `block (4 levels) in <top (required)>'.
`expect(collection).to have(20).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(20)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/completed_job_spec.rb:90:in `block (4 levels) in <top (required)>'.
`expect(collection).to have(20).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(20)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issue_aggregate_by_priority_spec.rb:46:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`expect(collection).to have(20).things`'. Set config.deprecation_stream to a File for full output.
`expect(collection).to have(0).batches` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/start_rush_collection_spec.rb:117:in `block (3 levels) in <module:ShardCreation>'.
`expect(collection).to have(3).batches` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(3)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/start_rush_collection_spec.rb:123:in `block (3 levels) in <module:ShardCreation>'.
`expect(collection).to have(0).jid` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.size).to eq(0)` instead. Called from /Users/myron/moz/vanguard/spec/integration/shard_creation/start_rush_collection_spec.rb:42:in `block (3 levels) in <module:ShardCreation>'.
`expect(collection).to have(6).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(6)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_spec.rb:65:in `block (3 levels) in <top (required)>'.
`expect(collection).to have(6).things` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like `expect(collection.count).to eq(6)` instead. Called from /Users/myron/moz/vanguard/spec/integration/models/crawl/crawl_issues_spec.rb:82:in `block (3 levels) in <top (required)>'.

645 deprecation warnings total

Notice that most of these are deprecations for the same thing (the have matcher), but our deprecation message is tailored to the specific use of the matcher, and thus isn't categorized properly by rspec-core's deprecation formatter.

Two idea to fix this:

  • Change the deprecation warning so that the first argument to RSpec.deprecate is something generic like "the have matcher" -- then rspec-core can categorize it properly.
  • Update the deprecation formatter to accept a :deprecation_id that is used for grouping for a case like this. Not sure how that would affect the too many uses of bit, though.

Thoughts, @soulcutter?

@soulcutter
Member

Have isn't the only matcher with this issue - it pretty much comes up with any matcher whose deprecation message includes user generated content.

Changing the matcher's deprecation message is the easiest thing, but I think you lose important information (the precise usage causing the deprecation message). Making it generic make users have to interpret the meaning of the message vs just grepping for that string in order to fix it. So I'm thinking we should not go this route.

The deprecation_id idea might work well, actually. It's unfortunate that it leaks an implementation detail, but I struggle to see a better solution. Hmm, I'll think about this for a bit.

@myronmarston
Member

Have isn't the only matcher with this issue - it pretty much comes up with any matcher whose deprecation message includes user generated content.

I know. The have matcher is the only one I'm aware of that has this problem, though.

Changing the matcher's deprecation message is the easiest thing, but I think you lose important information (the precise usage causing the deprecation message). Making it generic make users have to interpret the meaning of the message vs just grepping for that string in order to fix it. So I'm thinking we should not go this route.

IMO, the customized replacement expression is more important than the customized deprecated expression. We can keep the customized replacement expression. For the deprecated expression, the user can get it by looking at the call site.

@myronmarston
Member

I've been thinking about this some more, and I think the :deprecation_id option is the way to go. There's also the "Too many uses of deprecated '#{type}'" message that we'll need to consider here. I think the :deprecation_id string should worded by the caller in such a way that it would fit in that sentence as the type. Although, given that, :deprecation_id might not be the right term for the option.

@xaviershay
Member

I'm going to have a look at this now.

@myronmarston
Member

One other semi-related thing I've been thinking of doing: adding some '-' * 80 (or similar) delimiters before and after multi-line RSpec.warn_deprecation messages. Currently they run into each other and visually it's unclear where one message ends and the next begins. I've manually added the delimiters to a few of the more recent deprecation warnings but a better approach is to do it centrally in warn_deprecation for multi-line messages, and then update the call sites to no longer add the delimiters since it's handled centrally. Since this issue is likely going to involve updates to a number of the deprecation warnings it might make sense to add the delimiters at the same time.

@xaviershay xaviershay referenced this issue in rspec/rspec-core Feb 9, 2014
Merged

Allow custom grouping of deprecations #1307

@xaviershay
Member

Fixed!

@xaviershay xaviershay closed this Feb 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment