File: mailer_specs.feature

package info (click to toggle)
ruby-rspec-rails 7.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,796 kB
  • sloc: ruby: 11,068; sh: 198; makefile: 6
file content (43 lines) | stat: -rw-r--r-- 1,746 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Feature: Mailer generator spec

  Scenario: Mailer generator
    When I run `bundle exec rails generate mailer posts index show`
    Then the features should pass
    Then the output should contain:
      """
            create  app/mailers/posts_mailer.rb
            invoke  erb
            create    app/views/posts_mailer
            create    app/views/posts_mailer/index.text.erb
            create    app/views/posts_mailer/index.html.erb
            create    app/views/posts_mailer/show.text.erb
            create    app/views/posts_mailer/show.html.erb
            invoke  rspec
            create    spec/mailers/posts_mailer_spec.rb
            create    spec/fixtures/posts/index
            create    spec/fixtures/posts/show
            create    spec/mailers/previews/posts_mailer_preview.rb
      """

  Scenario: Mailer generator with customized `default-path`
    Given a file named ".rspec" with:
      """
      --default-path behaviour
      """
    And I run `bundle exec rails generate mailer posts index show`
    Then the features should pass
    Then the output should contain:
      """
            create  app/mailers/posts_mailer.rb
            invoke  erb
            create    app/views/posts_mailer
            create    app/views/posts_mailer/index.text.erb
            create    app/views/posts_mailer/index.html.erb
            create    app/views/posts_mailer/show.text.erb
            create    app/views/posts_mailer/show.html.erb
            invoke  rspec
            create    behaviour/mailers/posts_mailer_spec.rb
            create    behaviour/fixtures/posts/index
            create    behaviour/fixtures/posts/show
            create    behaviour/mailers/previews/posts_mailer_preview.rb
      """