Sha256: bd3e5f41f524c9729825416cd6a3d8383d2761a94755adb8a34b54af427514c0

Contents?: true

Size: 1.5 KB

Versions: 8

Compression:

Stored size: 1.5 KB

Contents

shared_context :parser_params do
  let(:client) { double Octokit::Client }
  let(:parser) { described_class.new client }
  let(:event_name) { 'issue_comment_event' }
  let(:parsing_method) { :"parse_#{event_name}" }
  let(:file) { "#{event_name}.json" }
  let(:event) { Hashie::Mash.new.deep_merge(decode file) }

  let(:default_params) do
    {
      notice_body: false,
      none_repository: false,
      nick: '',
      repository: '',
      status: '',
      link: '',
      title: '',
      body: []
    }
  end

  let(:parsed_params) do
    {
      status: 'commented on issue #582',
      title: 'Remove `engines` from package.json.',
      body: [
        <<-BODY.pretty_heredoc
          Has is ever done anything? It still has a purpose though;
          To warn users that they're using antdated version.
        BODY
      ],
      link: 'https://github.com/bower/bower/issues/582#issuecomment-20416296'
    }
  end

  let(:merged_params) do
    default_params.merge(parsed_params).merge(
      nick: 'sindresorhus',
      repository: 'bower/bower'
    )
  end

  let(:built_params) do
    [
      {
        nick: merged_params[:nick],
        type: :notice,
        message: <<-MSG.pretty_heredoc
          (bower/bower) \u0002sindresorhus\u000F \u000308commented on issue #582\u000F
          Remove `engines` from package.json. - \u000302http://git.io/A0ARbg\u000F
        MSG
      },
      {
        nick: merged_params[:nick],
        type: :private,
        message: parsed_params[:body]
      }
    ]
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
octospy-0.0.8 spec/support/shared_context.rb
octospy-0.0.7 spec/support/shared_context.rb
octospy-0.0.6 spec/support/shared_context.rb
octospy-0.0.5 spec/support/shared_context.rb
octospy-0.0.4 spec/support/shared_context.rb
octospy-0.0.3 spec/support/shared_context.rb
octospy-0.0.2 spec/support/shared_context.rb
octospy-0.0.1 spec/support/shared_context.rb