Class: Evergreen::Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/evergreen/suite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSuite

Returns a new instance of Suite


5
6
7
8
9
10
11
12
# File 'lib/evergreen/suite.rb', line 5

def initialize
  paths = [
    File.expand_path("config/evergreen.rb", root),
    File.expand_path(".evergreen", root),
    "#{ENV["HOME"]}/.evergreen"
  ]
  paths.each { |path| load(path) if File.exist?(path) }
end

Instance Attribute Details

#driverObject (readonly)

Returns the value of attribute driver


3
4
5
# File 'lib/evergreen/suite.rb', line 3

def driver
  @driver
end

Instance Method Details

#get_spec(name) ⇒ Object


22
23
24
# File 'lib/evergreen/suite.rb', line 22

def get_spec(name)
  Spec.new(self, name)
end

#helpersObject


38
39
40
41
42
# File 'lib/evergreen/suite.rb', line 38

def helpers
  Dir.glob(File.join(root, Evergreen.helper_dir, '*')).map do |path|
    Helper.new(self, File.basename(path))
  end
end

#mounted_atObject


18
19
20
# File 'lib/evergreen/suite.rb', line 18

def mounted_at
  Evergreen.mounted_at
end

#rootObject


14
15
16
# File 'lib/evergreen/suite.rb', line 14

def root
  Evergreen.root
end

#specsObject


26
27
28
29
30
# File 'lib/evergreen/suite.rb', line 26

def specs
  Dir.glob(File.join(root, Evergreen.spec_dir, '**/*_spec.{js,coffee}')).map do |path|
    Spec.new(self, path.gsub(File.join(root, Evergreen.spec_dir, ''), ''))
  end
end

#templatesObject


32
33
34
35
36
# File 'lib/evergreen/suite.rb', line 32

def templates
  Dir.glob(File.join(root, Evergreen.template_dir, '*')).map do |path|
    Template.new(self, File.basename(path))
  end
end