Sha256: 4a46b061b2264ea93ff2be14c036d888ca9f77837d55e66e3d2a56b5c6301d04

Contents?: true

Size: 1.38 KB

Versions: 19

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
    Given I replace the contents with "def f"
    And I move the cursor to (0,5)
    And I type "\n"
    Then the contents should be "def f\n\t"
    
  Scenario: It should decrease indentation on 'end' line
    When I replace the contents with "def f\n\t1\n\ten"
    And I move the cursor to (2,3)
    And I type "d"
    Then the contents should be "def f\n\t1\nend"
    
  Scenario: It should keep indentation the same if no change
    When I replace the contents with "\tfoo"
    And I move the cursor to (0,4)
    And I type "\n"
    Then the contents should be "\tfoo\n\t"
    
  Scenario: It should autoindent correctly
    When I replace the contents with "\tdef my_awesome_method\n\t\tfoo\n\tend"
    And I select from (0,0) to (2,4)
    And I auto-indent
    Then the contents should be "def my_awesome_method\n\tfoo\nend"
    
  Scenario: It should autoindent correctly
    When I replace the contents with "\tdef my_awesome_method\n\t\tfoo\n\tend"
    And I select from (0,0) to (2,4)
    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

19 entries across 19 versions & 2 rubygems

Version Path
redcar-0.13 plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.13.5dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.13.4dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.13.3dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.13.2dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.13.1dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-0.12.1 plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.13.0dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-0.12 plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.27dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.26dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.25dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.24dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.23dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.22dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.21dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.20dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.19dev plugins/auto_indenter/features/ruby_style_indentation.feature
redcar-dev-0.12.18dev plugins/auto_indenter/features/ruby_style_indentation.feature