8000 Rename test application class · stephancom/activeadmin@8670568 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8670568

Browse files
Rename test application class
Since it's used for more than generating the application, but also for asking information about it.
1 parent b2fcfc6 commit 8670568

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tasks/local.rake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
require_relative "application_generator"
1+
require_relative "test_application"
22

33
desc 'Run a command against the local sample application'
44
task :local do
5-
generator = ActiveAdmin::ApplicationGenerator.new(
5+
test_application = ActiveAdmin::TestApplication.new(
66
rails_env: 'development',
77
template: 'rails_template_with_data'
88
)
99

10-
generator.generate
10+
test_application.generate
1111

1212
# Discard the "local" argument (name of the task)
1313
argv = ARGV[1..-1]
@@ -22,7 +22,7 @@ task :local do
2222
gemfile = ENV['BUNDLE_GEMFILE'] || File.expand_path("../Gemfile", __dir__)
2323
env = { 'BUNDLE_GEMFILE' => gemfile }
2424

25-
Dir.chdir(generator.app_dir) do
25+
Dir.chdir(test_application.app_dir) do
2626
Bundler.with_original_env { Kernel.exec(env, command) }
2727
end
2828
end

tasks/test.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
require_relative "application_generator"
1+
require_relative "test_application"
22

33
desc "Run the full suite using parallel_tests to run on multiple cores"
44
task test: [:setup, :spec, :cucumber]
55

66
desc "Create a test rails app for the parallel specs to run against"
77
task :setup, [:rails_env, :template] do |_t, opts|
8-
ActiveAdmin::ApplicationGenerator.new(opts).generate
8+
ActiveAdmin::TestApplication.new(opts).generate
99
end
1010

1111
task spec: :"spec:all"

tasks/application_generator.rb renamed to tasks/test_application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'fileutils'
22

33
module ActiveAdmin
4-
class ApplicationGenerator
4+
class TestApplication
55
attr_reader :rails_env, :template
66

77
def initialize(opts = {})

0 commit comments

Comments
 (0)
0