Sha256: 8927c78c0adb001c0ef048592424cac044d7f56cde705bcb9c6bba4e11c1c3d3

Contents?: true

Size: 983 Bytes

Versions: 17

Compression:

Stored size: 983 Bytes

Contents

Feature: Use reek_of matcher
  As a developer
  In order to check code quality as part of my spec suite
  I want to assert that my code doesn't smell

  Background:
    Given the smelly file 'smelly.rb'
    And a file "reek_spec.rb" with:
    """
    require 'reek'
    require 'reek/spec'

    describe 'smelly.rb' do
      it 'is clean' do
        expect(Pathname.new('smelly.rb')).not_to reek
      end
    end
    """

  Scenario: Failing on a smelly file
    When I run `rspec reek_spec.rb`
    Then stdout should contain:
    """
    Failure/Error: expect(Pathname.new('smelly.rb')).not_to reek
    """

  Scenario: Masking smells with a configuration file
    Given a file named ".reek.yml" with:
      """
      ---
      detectors:
        UncommunicativeMethodName:
          enabled: false
        UncommunicativeVariableName:
          enabled: false
      """
    When I run `rspec reek_spec.rb`
    Then stdout should contain:
    """
    1 example, 0 failures
    """

Version data entries

17 entries across 15 versions & 2 rubygems

Version Path
reek-6.0.3 features/rspec_matcher.feature
reek-6.0.2 features/rspec_matcher.feature
reek-6.0.1 features/rspec_matcher.feature
reek-6.0.0 features/rspec_matcher.feature
reek-5.6.0 features/rspec_matcher.feature
reek-5.5.0 features/rspec_matcher.feature
reek-5.4.1 features/rspec_matcher.feature
reek-5.4.0 features/rspec_matcher.feature
reek-5.3.2 features/rspec_matcher.feature
reek-5.3.1 features/rspec_matcher.feature
reek-5.3.0 features/rspec_matcher.feature
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/rspec_matcher.feature
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/rspec_matcher.feature
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/rspec_matcher.feature
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/rspec_matcher.feature
reek-5.2.0 features/rspec_matcher.feature
reek-5.1.0 features/rspec_matcher.feature