spec/lib/stenographer/inputs/github_input_spec.rb in stenographer-rails-0.6.5 vs spec/lib/stenographer/inputs/github_input_spec.rb in stenographer-rails-0.7.0

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true describe Stenographer::Inputs::GithubInput do - let(:parser) { Stenographer::Inputs::GithubInput.new } + let(:parser) { described_class.new } describe '#parse' do let(:example_response) { File.read("#{Stenographer::Engine.root}/spec/fixtures/github_push_notification.json") } let(:master_branch_response) { example_response.gsub('refs/heads/cheetos', 'refs/heads/master') } let(:other_branch_response) { example_response.gsub('refs/heads/cheetos', 'refs/heads/buffalobills') } @@ -30,11 +30,11 @@ describe 'tracked branch' do let(:commit_data) { JSON.parse(master_branch_response, symbolize_names: true) } let(:commits) { commit_data[:commits] } describe 'use_changelog true' do - before :each do + before do Stenographer.use_changelog = true end it 'creates Changes for items with changelog' do changelog_commits = commits.select { |commit| commit[:message].include?('changelog') } @@ -49,10 +49,10 @@ expect(changes.last[:message]).not_to eq(changes.last[:subject]) end end describe 'use_changelog false' do - before :each do + before do Stenographer.use_changelog = false end it 'creates Changes for all items' do changes = parse_action