-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect RSpec default_path for generators #2508
- Loading branch information
Showing
30 changed files
with
379 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Feature: Channel generator spec | ||
|
||
Scenario: Channel generator | ||
When I run `bundle exec rails generate channel group` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
invoke rspec | ||
create spec/channels/group_channel_spec.rb | ||
""" | ||
Then the output should contain: | ||
""" | ||
create app/channels/group_channel.rb | ||
""" | ||
|
||
Scenario: Channel generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate channel group` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
invoke rspec | ||
create behaviour/channels/group_channel_spec.rb | ||
""" | ||
Then the output should contain: | ||
""" | ||
create app/channels/group_channel.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Feature: Controller generator spec | ||
|
||
Scenario: Controller generator | ||
When I run `bundle exec rails generate controller posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create app/controllers/posts_controller.rb | ||
invoke erb | ||
create app/views/posts | ||
invoke rspec | ||
create spec/requests/posts_spec.rb | ||
invoke helper | ||
create app/helpers/posts_helper.rb | ||
invoke rspec | ||
create spec/helpers/posts_helper_spec.rb | ||
""" | ||
|
||
Scenario: Controller generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate controller posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create app/controllers/posts_controller.rb | ||
invoke erb | ||
create app/views/posts | ||
invoke rspec | ||
create behaviour/requests/posts_spec.rb | ||
invoke helper | ||
create app/helpers/posts_helper.rb | ||
invoke rspec | ||
create behaviour/helpers/posts_helper_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: Feature generator spec | ||
|
||
Scenario: Feature generator | ||
When I run `bundle exec rails generate rspec:feature posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create spec/features/posts_spec.rb | ||
""" | ||
|
||
Scenario: Feature generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate rspec:feature posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create behaviour/features/posts_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: 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: | ||
""" | ||
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: | ||
""" | ||
create app/helpers/posts_helper.rb | ||
invoke rspec | ||
create behaviour/helpers/posts_helper_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: Integration generator spec | ||
|
||
Scenario: Integration generator | ||
When I run `bundle exec rails generate rspec:integration posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create spec/requests/posts_spec.rb | ||
""" | ||
|
||
Scenario: Integration generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate rspec:integration posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create behaviour/requests/posts_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: Job generator spec | ||
|
||
Scenario: Job generator | ||
When I run `bundle exec rails generate job user` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
invoke rspec | ||
create spec/jobs/user_job_spec.rb | ||
create app/jobs/user_job.rb | ||
""" | ||
|
||
Scenario: Job generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate job user` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
invoke rspec | ||
create behaviour/jobs/user_job_spec.rb | ||
create app/jobs/user_job.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: Mailbox generator spec | ||
|
||
Scenario: Mailbox generator | ||
When I run `bundle exec rails generate mailbox forwards` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create app/mailboxes/forwards_mailbox.rb | ||
invoke rspec | ||
create spec/mailboxes/forwards_mailbox_spec.rb | ||
""" | ||
|
||
Scenario: Mailbox generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate mailbox forwards` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create app/mailboxes/forwards_mailbox.rb | ||
invoke rspec | ||
create behaviour/mailboxes/forwards_mailbox_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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_spec.rb | ||
create spec/fixtures/posts/index | ||
create spec/fixtures/posts/show | ||
create spec/mailers/previews/posts_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_spec.rb | ||
create behaviour/fixtures/posts/index | ||
create behaviour/fixtures/posts/show | ||
create behaviour/mailers/previews/posts_preview.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: Request generator spec | ||
|
||
Scenario: Request generator | ||
When I run `bundle exec rails generate rspec:request posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create spec/requests/posts_spec.rb | ||
""" | ||
|
||
Scenario: Request generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate rspec:request posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create behaviour/requests/posts_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: System generator spec | ||
|
||
Scenario: System generator | ||
When I run `bundle exec rails generate rspec:system posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create spec/system/posts_spec.rb | ||
""" | ||
|
||
Scenario: System generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate rspec:system posts` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create behaviour/system/posts_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Feature: View generator spec | ||
|
||
Scenario: View generator | ||
When I run `bundle exec rails generate rspec:view posts index` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create spec/views/posts | ||
create spec/views/posts/index.html.erb_spec.rb | ||
""" | ||
|
||
Scenario: View generator with customized `default-path` | ||
Given a file named ".rspec" with: | ||
""" | ||
--default-path behaviour | ||
""" | ||
And I run `bundle exec rails generate rspec:view posts index` | ||
Then the features should pass | ||
Then the output should contain: | ||
""" | ||
create behaviour/views/posts | ||
create behaviour/views/posts/index.html.erb_spec.rb | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.