Module: Rails::Commands::ConsoleDelegation

Defined in:
lib/rails/commands/console_delegation.rb

Instance Method Summary collapse

Instance Method Details

#commanderObject



6
7
8
# File 'lib/rails/commands/console_delegation.rb', line 6

def commander
  @commander ||= Commander.new
end

#test(*args) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/rails/commands/console_delegation.rb', line 10

def test(*args)
  if Rails.env.test?
    commander.test(*args)
  else
    puts "You can only run tests in a console started in the test environment. " +
         "Use `./script/rails console test` to start such a console"
  end
end