spec/models/github_data_collector_spec.rb
def stub_comments(pr_data_file)
      pr_data = JSON.parse(pr_data_file)

      pr_data.each {|pr|
        stub_request(:get, (pr['url']).to_s)
          .to_return(status: 200, body: [].to_json, headers: {})
      }
    end
# Distribute fixture PRs over 25 day intervals from now to allow testing of 30/60 day intervals
Distribute fixture PRs over 25 day intervals from now to allow testing of 30/60 day intervals
Distribute fixture PRs over 25 day intervals from now to allow testing of 30 / 60 day intervals
def stub_comments(pr_data_file)
      pr_data = JSON.parse(pr_data_file)
      pr_data.each {|pr|
        stub_request(:get, (pr['url']).to_s)
          .to_return(status: 200, body: [].to_json, headers: {})
      }
    end
def stub_comments ( pr_data_file ) pr_data = JSON . parse ( pr_data_file ) pr_data . each { | pr | stub_request ( :get , ( pr [ 'url' ] ) . to_s ) . to_return ( status : 200 , body : [ ] . to_json , headers : { } ) } end
Distribute fixture PRs over 25 day intervals from now to allow testing of 30/60 day intervals
Distribute fixture PRs over 25 day intervals from now to allow testing of 30 / 60 day intervals
pr_data_file