spec/support/aliased_index.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer allow over expect when configuring a response.
Open

        expect(Elasticsearch::Persistence.client.indices).to receive(:get_alias).with(name: described_class.alias_name).and_raise(Elasticsearch::Transport::Transport::Errors::NotFound)
Severity: Minor
Found in spec/support/aliased_index.rb by rubocop

Prefer have_received for setting message expectations. Setup Elasticsearch::Persistence.client.indices as a spy using allow or instance_spy.
Open

        expect(Elasticsearch::Persistence.client.indices).to receive(:get_alias).with(name: described_class.alias_name).and_raise(Elasticsearch::Transport::Transport::Errors::NotFound)
Severity: Minor
Found in spec/support/aliased_index.rb by rubocop

Prefer using be_alias_exists matcher over alias_exists?.
Open

        expect(described_class.alias_exists?).to be_truthy
Severity: Minor
Found in spec/support/aliased_index.rb by rubocop

Prefer using be_alias_exists matcher over alias_exists?.
Open

        expect(described_class.alias_exists?).to be_falsey
Severity: Minor
Found in spec/support/aliased_index.rb by rubocop

Do not use expect in before hook
Open

        expect(Elasticsearch::Persistence.client.indices).to receive(:get_alias).with(name: described_class.alias_name).and_raise(Elasticsearch::Transport::Transport::Errors::NotFound)
Severity: Minor
Found in spec/support/aliased_index.rb by rubocop

There are no issues that match your filters.

Category
Status