Contents

Helper generator spec

Scenario: Helper generator

  • When I run `bundle exec rails generate helper posts`
  • Then the features should pass
  • Then the output should contain:
    text
          create  app/helpers/posts_helper.rb
          invoke  rspec
          create    spec/helpers/posts_helper_spec.rb

Scenario: Helper generator with customized default-path

  • Given a file named ".rspec" with:
    --default-path behaviour
  • And I run `bundle exec rails generate helper posts`
  • Then the features should pass
  • Then the output should contain:
    text
          create  app/helpers/posts_helper.rb
          invoke  rspec
          create    behaviour/helpers/posts_helper_spec.rb

Source: features/generator_specs/helper_specs.feature at v6.0.1, RSpec Rails (MIT license).