Class: Spring::Commands::RSpec

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

Instance Method Summary collapse

Methods inherited from Command

preloads, #preloads, preloads=

Instance Method Details

#call(args) ⇒ Object



107
108
109
110
# File 'lib/spring/commands.rb', line 107

def call(args)
  $0 = "rspec"
  ::RSpec::Core::Runner.run(args)
end

#descriptionObject



112
113
114
# File 'lib/spring/commands.rb', line 112

def description
  "Execute an RSpec spec."
end

#envObject



97
98
99
# File 'lib/spring/commands.rb', line 97

def env
  "test"
end

#setupObject



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

def setup
  $LOAD_PATH.unshift "spec"
  super
  require 'rspec/core'
end