diff --git a/Changelog.md b/Changelog.md index 3c51db4d37..2c0189267a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,10 @@ ### Development [Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.0.rc1...6-0-maintenance) +Enhancements: + +* Generators now respects default path configuration option. (@vivekmiyani, #2508) + Breaking Changes: * Change the order of `after_teardown` from `after` to `around` in system diff --git a/features/README.md b/features/README.md index 56801b2253..9e35924f5f 100644 --- a/features/README.md +++ b/features/README.md @@ -35,11 +35,15 @@ without having to type RAILS_ENV=test. Now you can run: - script/rails generate rspec:install + bundle exec rails generate rspec:install This adds the spec directory and some skeleton files, including a .rspec file. +You can also customize the default spec path with `--default-path` option: + + bundle exec rails generate rspec:install --default-path behaviour + ## Issues The documentation for rspec-rails is a work in progress. We'll be adding diff --git a/features/generator_specs/channel_specs.feature b/features/generator_specs/channel_specs.feature new file mode 100644 index 0000000000..133d5b935f --- /dev/null +++ b/features/generator_specs/channel_specs.feature @@ -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 + """ diff --git a/features/generator_specs/controller_specs.feature b/features/generator_specs/controller_specs.feature new file mode 100644 index 0000000000..9a3dd0162b --- /dev/null +++ b/features/generator_specs/controller_specs.feature @@ -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 + """ diff --git a/features/generator_specs/feature_specs.feature b/features/generator_specs/feature_specs.feature new file mode 100644 index 0000000000..761aad9ea8 --- /dev/null +++ b/features/generator_specs/feature_specs.feature @@ -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 + """ diff --git a/features/generator_specs/generator_specs.feature b/features/generator_specs/generator_specs.feature index 3a8e6d8360..a575fbd5c1 100644 --- a/features/generator_specs/generator_specs.feature +++ b/features/generator_specs/generator_specs.feature @@ -14,3 +14,20 @@ Feature: Generator spec invoke rspec create spec/generator/my_generators_generator_spec.rb """ + + Scenario: Use custom generator with customized `default-path` + Given a file named ".rspec" with: + """ + --default-path behaviour + """ + And I run `bundle exec rails generate generator my_generator` + Then the features should pass + Then the output should contain: + """ + create lib/generators/my_generator + create lib/generators/my_generator/my_generator_generator.rb + create lib/generators/my_generator/USAGE + create lib/generators/my_generator/templates + invoke rspec + create behaviour/generator/my_generators_generator_spec.rb + """ diff --git a/features/generator_specs/helper_specs.feature b/features/generator_specs/helper_specs.feature new file mode 100644 index 0000000000..515dc5ab04 --- /dev/null +++ b/features/generator_specs/helper_specs.feature @@ -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 + """ diff --git a/features/generator_specs/integration_specs.feature b/features/generator_specs/integration_specs.feature new file mode 100644 index 0000000000..7e8c56c16e --- /dev/null +++ b/features/generator_specs/integration_specs.feature @@ -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 + """ diff --git a/features/generator_specs/job_specs.feature b/features/generator_specs/job_specs.feature new file mode 100644 index 0000000000..63bda3ef5a --- /dev/null +++ b/features/generator_specs/job_specs.feature @@ -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 + """ diff --git a/features/generator_specs/mailbox_specs.feature b/features/generator_specs/mailbox_specs.feature new file mode 100644 index 0000000000..7a8de49a13 --- /dev/null +++ b/features/generator_specs/mailbox_specs.feature @@ -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 + """ diff --git a/features/generator_specs/mailer_specs.feature b/features/generator_specs/mailer_specs.feature new file mode 100644 index 0000000000..63778d916f --- /dev/null +++ b/features/generator_specs/mailer_specs.feature @@ -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 + """ diff --git a/features/generator_specs/request_specs.feature b/features/generator_specs/request_specs.feature new file mode 100644 index 0000000000..428dbc899a --- /dev/null +++ b/features/generator_specs/request_specs.feature @@ -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 + """ diff --git a/features/generator_specs/system_specs.feature b/features/generator_specs/system_specs.feature new file mode 100644 index 0000000000..4ffb7899fd --- /dev/null +++ b/features/generator_specs/system_specs.feature @@ -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 + """ diff --git a/features/generator_specs/view_specs.feature b/features/generator_specs/view_specs.feature new file mode 100644 index 0000000000..e98792846a --- /dev/null +++ b/features/generator_specs/view_specs.feature @@ -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 + """ diff --git a/lib/generators/rspec.rb b/lib/generators/rspec.rb index f343ba115d..34bdc8ce3e 100644 --- a/lib/generators/rspec.rb +++ b/lib/generators/rspec.rb @@ -1,4 +1,5 @@ require 'rails/generators/named_base' +require 'rspec/core' require 'rspec/rails/feature_check' # @private @@ -18,6 +19,21 @@ def self.source_root(path = nil) @_rspec_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'rspec', generator_name, 'templates')) end end + + # @private + # Load configuration from RSpec to ensure `--default-path` is set + def self.configuration + @configuration ||= begin + configuration = RSpec.configuration + options = RSpec::Core::ConfigurationOptions.new({}) + options.configure(configuration) + configuration + end + end + + def target_path(*paths) + File.join(self.class.configuration.default_path, *paths) + end end end end diff --git a/lib/generators/rspec/channel/channel_generator.rb b/lib/generators/rspec/channel/channel_generator.rb index 1e1937bc99..55b86a826d 100644 --- a/lib/generators/rspec/channel/channel_generator.rb +++ b/lib/generators/rspec/channel/channel_generator.rb @@ -5,7 +5,7 @@ module Generators # @private class ChannelGenerator < Base def create_channel_spec - template 'channel_spec.rb.erb', File.join('spec/channels', class_path, "#{file_name}_channel_spec.rb") + template 'channel_spec.rb.erb', target_path('channels', class_path, "#{file_name}_channel_spec.rb") end end end diff --git a/lib/generators/rspec/controller/controller_generator.rb b/lib/generators/rspec/controller/controller_generator.rb index 4111a9aabb..c55e093d87 100644 --- a/lib/generators/rspec/controller/controller_generator.rb +++ b/lib/generators/rspec/controller/controller_generator.rb @@ -16,14 +16,14 @@ def generate_request_spec return unless options[:request_specs] template 'request_spec.rb', - File.join('spec/requests', class_path, "#{file_name}_spec.rb") + target_path('requests', class_path, "#{file_name}_spec.rb") end def generate_controller_spec return unless options[:controller_specs] template 'controller_spec.rb', - File.join('spec/controllers', class_path, "#{file_name}_controller_spec.rb") + target_path('controllers', class_path, "#{file_name}_controller_spec.rb") end def generate_view_specs @@ -35,7 +35,7 @@ def generate_view_specs actions.each do |action| @action = action template 'view_spec.rb', - File.join("spec", "views", file_path, "#{@action}.html.#{options[:template_engine]}_spec.rb") + target_path('views', file_path, "#{@action}.html.#{options[:template_engine]}_spec.rb") end end @@ -44,7 +44,7 @@ def generate_routing_spec return unless options[:routing_specs] template 'routing_spec.rb', - File.join('spec/routing', class_path, "#{file_name}_routing_spec.rb") + target_path('routing', class_path, "#{file_name}_routing_spec.rb") end end end diff --git a/lib/generators/rspec/feature/feature_generator.rb b/lib/generators/rspec/feature/feature_generator.rb index 5b9bfc4675..4e383d3cb5 100644 --- a/lib/generators/rspec/feature/feature_generator.rb +++ b/lib/generators/rspec/feature/feature_generator.rb @@ -10,7 +10,7 @@ class FeatureGenerator < Base def generate_feature_spec return unless options[:feature_specs] - template template_name, File.join('spec/features', class_path, filename) + template template_name, target_path('features', class_path, filename) end def template_name diff --git a/lib/generators/rspec/generator/generator_generator.rb b/lib/generators/rspec/generator/generator_generator.rb index 9d73d2ddc5..40118e83a2 100644 --- a/lib/generators/rspec/generator/generator_generator.rb +++ b/lib/generators/rspec/generator/generator_generator.rb @@ -9,7 +9,7 @@ class GeneratorGenerator < Base def generate_generator_spec return unless options[:generator_specs] - template template_name, File.join('spec/generator', class_path, filename) + template template_name, target_path('generator', class_path, filename) end def template_name diff --git a/lib/generators/rspec/helper/helper_generator.rb b/lib/generators/rspec/helper/helper_generator.rb index a035f8e4a7..dd820c7dfc 100644 --- a/lib/generators/rspec/helper/helper_generator.rb +++ b/lib/generators/rspec/helper/helper_generator.rb @@ -9,7 +9,7 @@ class HelperGenerator < Base def generate_helper_spec return unless options[:helper_specs] - template 'helper_spec.rb', File.join('spec/helpers', class_path, "#{file_name}_helper_spec.rb") + template 'helper_spec.rb', target_path('helpers', class_path, "#{file_name}_helper_spec.rb") end end end diff --git a/lib/generators/rspec/install/install_generator.rb b/lib/generators/rspec/install/install_generator.rb index 8b832089d3..1bd4a23cb3 100644 --- a/lib/generators/rspec/install/install_generator.rb +++ b/lib/generators/rspec/install/install_generator.rb @@ -12,6 +12,8 @@ class InstallGenerator < ::Rails::Generators::Base Copy rspec files to your application. DESC + class_option :default_path, type: :string, default: 'spec' + def self.source_root @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates')) end @@ -20,12 +22,12 @@ def copy_spec_files Dir.mktmpdir do |dir| generate_rspec_init dir template File.join(dir, '.rspec'), '.rspec' - directory File.join(dir, 'spec'), 'spec' + directory File.join(dir, 'spec'), default_path end end def copy_rails_files - template 'spec/rails_helper.rb' + template 'spec/rails_helper.rb', "#{default_path}/rails_helper.rb" end private @@ -41,6 +43,12 @@ def generate_rspec_init(tmpdir) replace_generator_command(spec_helper_path) remove_warnings_configuration(spec_helper_path) + + unless default_path == "spec" + dot_rspec_path = File.join(tmpdir, '.rspec') + + append_default_path(dot_rspec_path) + end end def replace_generator_command(spec_helper_path) @@ -58,6 +66,15 @@ def remove_warnings_configuration(spec_helper_path) '', verbose: false end + + def append_default_path(dot_rspec_path) + append_to_file dot_rspec_path, + "--default-path #{default_path}" + end + + def default_path + options[:default_path] + end end end end diff --git a/lib/generators/rspec/integration/integration_generator.rb b/lib/generators/rspec/integration/integration_generator.rb index c0de337d72..ed281e832e 100644 --- a/lib/generators/rspec/integration/integration_generator.rb +++ b/lib/generators/rspec/integration/integration_generator.rb @@ -22,7 +22,7 @@ def generate_request_spec WARNING template 'request_spec.rb', - File.join('spec/requests', "#{name.underscore.pluralize}_spec.rb") + target_path('requests', "#{name.underscore.pluralize}_spec.rb") end end end diff --git a/lib/generators/rspec/job/job_generator.rb b/lib/generators/rspec/job/job_generator.rb index 1d167856b8..06196797bb 100644 --- a/lib/generators/rspec/job/job_generator.rb +++ b/lib/generators/rspec/job/job_generator.rb @@ -6,7 +6,7 @@ module Generators class JobGenerator < Base def create_job_spec file_suffix = file_name.end_with?('job') ? 'spec.rb' : 'job_spec.rb' - template 'job_spec.rb.erb', File.join('spec/jobs', class_path, [file_name, file_suffix].join('_')) + template 'job_spec.rb.erb', target_path('jobs', class_path, [file_name, file_suffix].join('_')) end end end diff --git a/lib/generators/rspec/mailbox/mailbox_generator.rb b/lib/generators/rspec/mailbox/mailbox_generator.rb index 1277326e3b..601c892115 100644 --- a/lib/generators/rspec/mailbox/mailbox_generator.rb +++ b/lib/generators/rspec/mailbox/mailbox_generator.rb @@ -6,7 +6,7 @@ module Generators class MailboxGenerator < Base def create_mailbox_spec template('mailbox_spec.rb.erb', - File.join('spec/mailboxes', class_path, "#{file_name}_mailbox_spec.rb") + target_path('mailboxes', class_path, "#{file_name}_mailbox_spec.rb") ) end end diff --git a/lib/generators/rspec/mailer/mailer_generator.rb b/lib/generators/rspec/mailer/mailer_generator.rb index 0030dbffe4..7aeb10eeac 100644 --- a/lib/generators/rspec/mailer/mailer_generator.rb +++ b/lib/generators/rspec/mailer/mailer_generator.rb @@ -8,20 +8,20 @@ class MailerGenerator < Base argument :actions, type: :array, default: [], banner: "method method" def generate_mailer_spec - template "mailer_spec.rb", File.join('spec/mailers', class_path, "#{file_name}_spec.rb") + template "mailer_spec.rb", target_path('mailers', class_path, "#{file_name}_spec.rb") end def generate_fixtures_files actions.each do |action| @action, @path = action, File.join(file_path, action) - template "fixture", File.join("spec/fixtures", @path) + template "fixture", target_path("fixtures", @path) end end def generate_preview_files return unless RSpec::Rails::FeatureCheck.has_action_mailer_preview? - template "preview.rb", File.join("spec/mailers/previews", class_path, "#{file_name}_preview.rb") + template "preview.rb", target_path("mailers/previews", class_path, "#{file_name}_preview.rb") end end end diff --git a/lib/generators/rspec/model/model_generator.rb b/lib/generators/rspec/model/model_generator.rb index 6ab0ffb666..3b757ce59e 100644 --- a/lib/generators/rspec/model/model_generator.rb +++ b/lib/generators/rspec/model/model_generator.rb @@ -11,8 +11,8 @@ class ModelGenerator < Base class_option :fixture, type: :boolean def create_model_spec - template_file = File.join( - 'spec/models', + template_file = target_path( + 'models', class_path, "#{file_name}_spec.rb" ) @@ -24,7 +24,7 @@ def create_model_spec def create_fixture_file return unless missing_fixture_replacement? - template 'fixtures.yml', File.join('spec/fixtures', class_path, "#{(pluralize_table_names? ? plural_file_name : file_name)}.yml") + template 'fixtures.yml', target_path('fixtures', class_path, "#{(pluralize_table_names? ? plural_file_name : file_name)}.yml") end private diff --git a/lib/generators/rspec/request/request_generator.rb b/lib/generators/rspec/request/request_generator.rb index ea8bd182e2..b6114e1e3b 100644 --- a/lib/generators/rspec/request/request_generator.rb +++ b/lib/generators/rspec/request/request_generator.rb @@ -10,7 +10,7 @@ def generate_request_spec return unless options[:request_specs] template 'request_spec.rb', - File.join('spec/requests', "#{name.underscore.pluralize}_spec.rb") + target_path('requests', "#{name.underscore.pluralize}_spec.rb") end end end diff --git a/lib/generators/rspec/scaffold/scaffold_generator.rb b/lib/generators/rspec/scaffold/scaffold_generator.rb index 23987555f2..7e0af83ee0 100644 --- a/lib/generators/rspec/scaffold/scaffold_generator.rb +++ b/lib/generators/rspec/scaffold/scaffold_generator.rb @@ -58,8 +58,8 @@ def generate_view_specs def generate_routing_spec return unless options[:routing_specs] - template_file = File.join( - 'spec/routing', + template_file = target_path( + 'routing', controller_class_path, "#{controller_file_name}_routing_spec.rb" ) @@ -72,7 +72,7 @@ def generate_routing_spec def copy_view(view) template "#{view}_spec.rb", - File.join("spec/views", controller_file_path, "#{view}.html.#{options[:template_engine]}_spec.rb") + target_path("views", controller_file_path, "#{view}.html.#{options[:template_engine]}_spec.rb") end # support for namespaced-resources @@ -121,7 +121,7 @@ def raw_value_for(attribute) end def template_file(folder:, suffix: '') - File.join('spec', folder, controller_class_path, "#{controller_file_name}#{suffix}_spec.rb") + target_path(folder, controller_class_path, "#{controller_file_name}#{suffix}_spec.rb") end def banner diff --git a/lib/generators/rspec/system/system_generator.rb b/lib/generators/rspec/system/system_generator.rb index 4735632e90..6f3667a208 100644 --- a/lib/generators/rspec/system/system_generator.rb +++ b/lib/generators/rspec/system/system_generator.rb @@ -9,7 +9,7 @@ class SystemGenerator < Base def generate_system_spec return unless options[:system_specs] - template template_name, File.join('spec/system', class_path, filename) + template template_name, target_path('system', class_path, filename) end def template_name diff --git a/lib/generators/rspec/view/view_generator.rb b/lib/generators/rspec/view/view_generator.rb index 5de24267e5..75c9b2619a 100644 --- a/lib/generators/rspec/view/view_generator.rb +++ b/lib/generators/rspec/view/view_generator.rb @@ -9,12 +9,12 @@ class ViewGenerator < Base class_option :template_engine, desc: "Template engine to generate view files" def create_view_specs - empty_directory File.join("spec", "views", file_path) + empty_directory target_path("views", file_path) actions.each do |action| @action = action template 'view_spec.rb', - File.join("spec", "views", file_path, "#{@action}.html.#{options[:template_engine]}_spec.rb") + target_path("views", file_path, "#{@action}.html.#{options[:template_engine]}_spec.rb") end end end