Sha256: 64c253193d201fd9ffa0795cb99837a559fd6f82ac9d2acef2072d46d83421d5

Contents?: true

Size: 1.38 KB

Versions: 16

Compression:

Stored size: 1.38 KB

Contents

Feature: Indents Ruby code correctly

  Background:
    Given the indentation rules are like Ruby's
    When I open a new edit tab
    And tabs are hard
    
  Scenario: It should increase indentation after 'def's
    When I insert "def f" at the cursor
    And I move the cursor to 5
    And I insert "\n" at the cursor
    Then the contents should be "def f\n\t"
    
  Scenario: It should decrease indentation on 'end' line
    When I insert "def f\n\t1\n\ten" at the cursor
    And I move the cursor to 12
    And I insert "d" at the cursor
    Then the contents should be "def f\n\t1\nend"
    
  Scenario: It should keep indentation the same if no change
    When I insert "\tfoo" at the cursor
    And I move the cursor to 4
    And I insert "\n" at the cursor
    Then the contents should be "\tfoo\n\t"
    
  Scenario: It should autoindent correctly
    When I insert "\tdef my_awesome_method\n\t\tfoo\n\tend" at the cursor
    And I select from 0 to 33
    And I auto-indent
    Then the contents should be "def my_awesome_method\n\tfoo\nend"
    
  Scenario: It should autoindent correctly
    When I insert "\tdef my_awesome_method\n\t\tfoo\n\tend" at the cursor
    And I select from 0 to 33
    And I auto-indent
    Then the contents should be "def my_awesome_method\n\tfoo\nend"
    When I undo
    Then the contents should be "\tdef my_awesome_method\n\t\tfoo\n\tend"
    
    
        
        

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
redcar-dev-0.12.17dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.16dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.15dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.14dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.13dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.12dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.11dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.10dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.9dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.8dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.7dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.6dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.4dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.3dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.1dev-java plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.0dev-java plugins/auto_indenter/features/ruby_style_indentation.feature