Sha256: 4513e583cd2dfbf87a333fd5d0e0a241cff43baeade5e140bdb4e8e376123246

Contents?: true

Size: 1.41 KB

Versions: 25

Compression:

Stored size: 1.41 KB

Contents

Feature: Adhearsion controller generator
  In order to speed up development of an Adhearsion app
  As an Adhearsion developer
  I want to generate a controller and its tests

  Scenario: Generate a controller and a test file
    When I run `ahn create path/somewhere`
    And I cd to "path/somewhere"
    And I run `ahn generate controller TestController`
    Then the following directories should exist:
      | lib                           |
      | spec                          |

    And the following files should exist:
      | lib/test_controller.rb         |
      | spec/test_controller_spec.rb |

    And the file "lib/test_controller.rb" should contain "class TestController < Adhearsion::CallController"
    And the file "spec/test_controller_spec.rb" should contain "describe TestController"

  Scenario: Generate a controller with lower-case name
    When I run `ahn create path/somewhere`
    And I cd to "path/somewhere"
    And I run `ahn generate controller test_controller`
    Then the following directories should exist:
      | lib                           |
      | spec                          |

    And the following files should exist:
      | lib/test_controller.rb         |
      | spec/test_controller_spec.rb |

    And the file "lib/test_controller.rb" should contain "class TestController < Adhearsion::CallController"
    And the file "spec/test_controller_spec.rb" should contain "describe TestController"

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
adhearsion-2.6.4 features/controller_generator.feature
adhearsion-2.6.3 features/controller_generator.feature
adhearsion-3.0.0.rc1 features/controller_generator.feature
adhearsion-3.0.0.beta2 features/controller_generator.feature
adhearsion-3.0.0.beta1 features/controller_generator.feature
adhearsion-2.6.2 features/controller_generator.feature
adhearsion-2.6.1 features/controller_generator.feature
adhearsion-2.6.0 features/controller_generator.feature
adhearsion-2.5.4 features/controller_generator.feature
adhearsion-2.5.3 features/controller_generator.feature
adhearsion-2.5.2 features/controller_generator.feature
adhearsion-2.5.0 features/controller_generator.feature
adhearsion-2.4.0 features/controller_generator.feature
adhearsion-2.4.0.beta3 features/controller_generator.feature
adhearsion-2.4.0.beta2 features/controller_generator.feature
adhearsion-2.4.0.beta1 features/controller_generator.feature
adhearsion-2.3.5 features/controller_generator.feature
adhearsion-2.3.4 features/controller_generator.feature
adhearsion-2.3.3 features/controller_generator.feature
adhearsion-2.3.2 features/controller_generator.feature