Skip to content

Commit

Permalink
Merge pull request #177 from petergoldstein/feature/add_rails_7_to_ci
Browse files Browse the repository at this point in the history
Add Rails 7 to CI
  • Loading branch information
petergoldstein authored Jan 7, 2022
2 parents c18fccb + 1f313bf commit db4c463
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ jobs:
- ruby-version: 3.1
bundler-version: default
rails-version: 6.1
- ruby-version: 2.7
bundler-version: default
rails-version: '7.0'
- ruby-version: '3.0'
bundler-version: default
rails-version: '7.0'
- ruby-version: '3.1'
bundler-version: default
rails-version: '7.0'
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
Expand Down
8 changes: 4 additions & 4 deletions spec/lib/logstasher/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def subject.index(*_args)
it 'adds default fields to payload' do
expect(LogStasher).to receive(:add_default_fields_to_payload).once
expect(LogStasher).to receive(:add_default_fields_to_request_context).once
subject.process_action(:index)
subject.send(:process_action, :index)
end

it 'creates the request context before processing' do
LogStasher.request_context[:some_key] = 'value'
expect(LogStasher).to receive(:clear_request_context).once.and_call_original
expect do
subject.process_action(:index)
subject.send(:process_action, :index)
end.to change { LogStasher.request_context }
end

Expand All @@ -41,7 +41,7 @@ def subject.index(*_args)
anything).once
expect(ActiveSupport::Notifications).to receive(:instrument).with('process_action.action_controller',
anything).once
subject.process_action(:index)
subject.send(:process_action, :index)
end

context 'request context has custom fields defined' do
Expand All @@ -56,7 +56,7 @@ def subject.index(*_args)
end

it 'should retain the value in the request context' do
subject.process_action(:index)
subject.send(:process_action, :index)
end

after :each do
Expand Down

0 comments on commit db4c463

Please sign in to comment.