Class: LearnTest::Strategies::Jasmine
Instance Attribute Summary
#options, #runner
Instance Method Summary
collapse
#argv, #configure, #die, #initialize, #output, #run_install
Instance Method Details
#check_dependencies ⇒ Object
#cleanup ⇒ Object
55
56
57
58
59
60
61
|
# File 'lib/learn_test/strategies/jasmine.rb', line 55
def cleanup
test_xml_files.each do |file|
FileUtils.rm(file)
end
FileUtils.rm_rf("#{Dir.pwd}/tmpTestSupport") if !browser?
end
|
#detect ⇒ Object
15
16
17
|
# File 'lib/learn_test/strategies/jasmine.rb', line 15
def detect
runner.files.include?('requires.yml')
end
|
#push_results? ⇒ Boolean
51
52
53
|
# File 'lib/learn_test/strategies/jasmine.rb', line 51
def push_results?
!local? && !browser?
end
|
#results ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/learn_test/strategies/jasmine.rb', line 33
def results
@results ||= {
username: username,
github_user_id: user_id,
repo_name: runner.repo,
build: {
test_suite: [{
framework: 'jasmine',
formatted_output: [],
duration: 0.0
}]
},
tests: 0,
errors: 0,
failures: 0
}
end
|
#run ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/learn_test/strategies/jasmine.rb', line 23
def run
if options[:init]
LearnTest::Jasmine::Initializer.run
else
set_up_runner
run_jasmine
make_json
end
end
|
#service_endpoint ⇒ Object
11
12
13
|
# File 'lib/learn_test/strategies/jasmine.rb', line 11
def service_endpoint
'/e/flatiron_jasmine'
end
|
#user_id ⇒ Object
67
68
69
|
# File 'lib/learn_test/strategies/jasmine.rb', line 67
def user_id
options[:skip] ? "none" : super
end
|
#username ⇒ Object
63
64
65
|
# File 'lib/learn_test/strategies/jasmine.rb', line 63
def username
options[:skip] ? "jasmine-flatiron" : super
end
|