expertiza/expertiza

View on GitHub
spec/controllers/institution_controller_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [145/25]
Open

describe InstitutionController do
  let(:admin) { build(:admin) }
  let(:instructor) { build(:instructor, id: 6) }
  let(:instructor2) { build(:instructor, id: 66) }
  let(:ta) { build(:teaching_assistant, id: 8) }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [27/25]
Open

  describe '#action_allowed?' do
    context 'when params action is edit or update' do
      before(:each) do
        controller.params = { id: '1', action: 'edit' }
      end

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Block has too many lines. [26/25]
Open

  describe '#update' do
    context 'when institution is updated successfully' do
      it 'renders institution#list' do
        request_params = {
          id: 1,

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Space inside parentheses detected.
Open

         expect( controller.send(:action_allowed?)).to be true

Checks for spaces inside ordinary round parentheses.

Example:

# bad
f( 3)
g = (a + 3 )

# good
f(3)
g = (a + 3)

Inconsistent indentation detected.
Open

         expect( controller.send(:action_allowed?)).to be true

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

There are no issues that match your filters.

Category
Status