class RailsNewApp::TestFactoryScreen
Public Class Methods
default()
click to toggle source
# File lib/rails-new-app/screens/test_factory_screen.rb, line 26 def self.default { option_number: 1, name: "None", key: "" } end
Public Instance Methods
after_valid()
click to toggle source
# File lib/rails-new-app/screens/test_factory_screen.rb, line 22 def after_valid puts "Selected test factories tool is: #{option}\n" end
lowercase_keys()
click to toggle source
# File lib/rails-new-app/screens/test_factory_screen.rb, line 18 def lowercase_keys ["", "factory_bot"] end
next_step()
click to toggle source
# File lib/rails-new-app/screens/test_factory_screen.rb, line 34 def next_step :test_fake_data end
options()
click to toggle source
# File lib/rails-new-app/screens/test_factory_screen.rb, line 13 def options # TODO: add Forgery and Fabrication? ["None", "FactoryBot"] end
step_question()
click to toggle source
# File lib/rails-new-app/screens/test_factory_screen.rb, line 3 def step_question warning = if config[:test_runner][:key] == "" "This configuration will be ignored because you selected no test runner\n" else "" end "#{warning}Type the option number of the test factories tool to use:" end