Class: Spring::Commands::RailsTest

Inherits:
Rails
  • Object
show all
Defined in:
lib/spring/commands/rails.rb

Instance Method Summary collapse

Methods inherited from Rails

#call, #description

Instance Method Details

#command_nameObject



101
102
103
# File 'lib/spring/commands/rails.rb', line 101

def command_name
  "test"
end

#env(args) ⇒ Object



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/spring/commands/rails.rb', line 87

def env(args)
  environment = "test"

  args.each.with_index do |arg, i|
    if arg =~ /--environment=(\w+)/
      environment = $1
    elsif i > 0 && args[i - 1] == "-e"
      environment = arg
    end
  end

  environment
end