Class: Everqueen::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/everqueen/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(suite, name) ⇒ Test

Returns a new instance of Test.



7
8
9
10
# File 'lib/everqueen/test.rb', line 7

def initialize(suite, name)
  @suite = suite
  @name = name.sub('js.coffee.erb', 'js').sub('js.coffee', 'js').sub('js.erb', 'js')
end

Instance Attribute Details

#nameObject (readonly) Also known as: asset_path

Returns the value of attribute name.



5
6
7
# File 'lib/everqueen/test.rb', line 5

def name
  @name
end

#suiteObject (readonly)

Returns the value of attribute suite.



5
6
7
# File 'lib/everqueen/test.rb', line 5

def suite
  @suite
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/everqueen/test.rb', line 34

def exist?
  File.exist?(full_path)
end

#failure_messagesObject



30
31
32
# File 'lib/everqueen/test.rb', line 30

def failure_messages
  runner.failure_messages
end

#full_pathObject



16
17
18
# File 'lib/everqueen/test.rb', line 16

def full_path
  File.join(root, Everqueen.test_dir, name)
end

#passed?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/everqueen/test.rb', line 26

def passed?
  runner.passed?
end

#rootObject



12
13
14
# File 'lib/everqueen/test.rb', line 12

def root
  suite.root
end

#urlObject



22
23
24
# File 'lib/everqueen/test.rb', line 22

def url
  "#{suite.mounted_at}/run/#{name}"
end