learn-test 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/learn_test/strategies/jasmine.rb +24 -4
- data/lib/learn_test/strategies/jasmine/runners/SpecRunner.html +11 -11
- data/lib/learn_test/strategies/jasmine/templates/SpecRunnerTemplate.html.erb +11 -11
- data/lib/learn_test/strategies/jasmine/templates/SpecRunnerTemplateNoColor.html.erb +11 -11
- data/lib/learn_test/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76fa238197b63d9b5d730b6d9ed75476859e2610
|
4
|
+
data.tar.gz: bc20f0414b90103f04d043cece7be855121479cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f79e4e8b4a637714adb32667229f867dee722376c367d7a5e392c6e0ec25d2ba4fed0cd64049b9ee3e602ddd03bb5362421a28689e1e930730cbef79ee0317ee
|
7
|
+
data.tar.gz: c40a9141b7b145cb54ee969a927349b922c39bbf3200a278849758e8380fcbf5b110befcc215420a7650d4465a3a3108b743350b29ebe4eb7ee93690e10a6853
|
@@ -56,6 +56,9 @@ module LearnTest
|
|
56
56
|
test_xml_files.each do |file|
|
57
57
|
FileUtils.rm(file)
|
58
58
|
end
|
59
|
+
|
60
|
+
sleep 1 if browser?
|
61
|
+
FileUtils.rm_rf("#{Dir.pwd}/tmpTestSupport")
|
59
62
|
end
|
60
63
|
|
61
64
|
def username
|
@@ -81,20 +84,37 @@ module LearnTest
|
|
81
84
|
@javascripts << (required_specs && required_specs.map {|f| "#{test_path}/#{f}"} )
|
82
85
|
@javascripts.flatten!.compact!
|
83
86
|
|
84
|
-
|
85
|
-
|
87
|
+
copy_support_files
|
88
|
+
|
89
|
+
File.open("#{Dir.pwd}/tmpTestSupport/SpecRunner#{color_option}.html", "w+") do |f|
|
86
90
|
f << template.result(binding)
|
87
91
|
end
|
88
92
|
end
|
89
93
|
|
94
|
+
def copy_support_files
|
95
|
+
FileUtils.mkdir("#{Dir.pwd}/tmpTestSupport") if !File.exist?("#{Dir.pwd}/tmpTestSupport")
|
96
|
+
|
97
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jasmine.js","#{Dir.pwd}/tmpTestSupport/")
|
98
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jasmine-html.js","#{Dir.pwd}/tmpTestSupport/")
|
99
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/console.js","#{Dir.pwd}/tmpTestSupport/")
|
100
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/boot.js","#{Dir.pwd}/tmpTestSupport/")
|
101
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jquery-1.8.0.min.js","#{Dir.pwd}/tmpTestSupport/")
|
102
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jquery-ui-1.8.23.custom.min.js","#{Dir.pwd}/tmpTestSupport/")
|
103
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jasmine-jquery.js","#{Dir.pwd}/tmpTestSupport/")
|
104
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jasmine.css","#{Dir.pwd}/tmpTestSupport/")
|
105
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine')}/jasmine_favicon.png","#{Dir.pwd}/tmpTestSupport/")
|
106
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine/formatters')}/jasmine2-junit.js","#{Dir.pwd}/tmpTestSupport/")
|
107
|
+
FileUtils.cp("#{LearnTest::FileFinder.location_to_dir('strategies/jasmine/helpers')}/ConsoleHelper.js","#{Dir.pwd}/tmpTestSupport/")
|
108
|
+
end
|
109
|
+
|
90
110
|
def run_jasmine
|
91
111
|
if browser?
|
92
112
|
# system("open #{LearnTest::FileFinder.location_to_dir('jasmine/runners')}/SpecRunner#{color_option}.html --args allow-file-access-from-files")
|
93
|
-
chrome_with_file_access_command = "\"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome\" \"#{
|
113
|
+
chrome_with_file_access_command = "\"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome\" \"#{Dir.pwd}/tmpTestSupport/SpecRunner#{color_option}.html\" --allow-file-access-from-files"
|
94
114
|
# This should give me back to the prompt - u can use & but a flag to send it to the background would be better.
|
95
115
|
system(chrome_with_file_access_command)
|
96
116
|
else
|
97
|
-
system("phantomjs #{LearnTest::FileFinder.location_to_dir('strategies/jasmine/runners')}/run-jasmine.js #{
|
117
|
+
system("phantomjs #{LearnTest::FileFinder.location_to_dir('strategies/jasmine/runners')}/run-jasmine.js #{Dir.pwd}/tmpTestSupport/SpecRunner#{color_option}.html")
|
98
118
|
end
|
99
119
|
end
|
100
120
|
|
@@ -4,17 +4,17 @@
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<title>Jasmine Spec Runner v2.0.0</title>
|
6
6
|
|
7
|
-
<link rel="shortcut icon" type="image/png" href="
|
8
|
-
<link rel="stylesheet" type="text/css" href="
|
7
|
+
<link rel="shortcut icon" type="image/png" href="./jasmine_favicon.png">
|
8
|
+
<link rel="stylesheet" type="text/css" href="./jasmine.css">
|
9
9
|
|
10
|
-
<script type="text/javascript" src="
|
11
|
-
<script type="text/javascript" src="
|
12
|
-
<script type="text/javascript" src="
|
13
|
-
<script type="text/javascript" src="
|
14
|
-
<script type="text/javascript" src="
|
15
|
-
<script type="text/javascript" src="
|
16
|
-
<script type="text/javascript" src="
|
17
|
-
<script type="text/javascript" src="
|
10
|
+
<script type="text/javascript" src="./jasmine.js"></script>
|
11
|
+
<script type="text/javascript" src="./jasmine-html.js"></script>
|
12
|
+
<script type="text/javascript" src="./console.js"></script>
|
13
|
+
<script type="text/javascript" src="./jasmine2-junit.js"></script>
|
14
|
+
<script type="text/javascript" src="./boot.js"></script>
|
15
|
+
<script type="text/javascript" src="./jquery-1.8.0.min.js"></script>
|
16
|
+
<script type="text/javascript" src="./jquery-ui-1.8.23.custom.min.js"></script>
|
17
|
+
<script type="text/javascript" src="./jasmine-jquery.js"></script>
|
18
18
|
|
19
19
|
|
20
20
|
<script>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<script type="text/javascript" src="/Users/avi/ib-gem/spec/fixtures/jasmine-jquery-fixtures/spec/jasmine-jquery-fixtures-spec.js"></script>
|
27
27
|
|
28
28
|
|
29
|
-
<script type="text/javascript" src="
|
29
|
+
<script type="text/javascript" src="./ConsoleHelper.js"></script>
|
30
30
|
</head>
|
31
31
|
|
32
32
|
<body>
|
@@ -4,17 +4,17 @@
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<title>Jasmine Spec Runner v2.0.0</title>
|
6
6
|
|
7
|
-
<link rel="shortcut icon" type="image/png" href="
|
8
|
-
<link rel="stylesheet" type="text/css" href="
|
7
|
+
<link rel="shortcut icon" type="image/png" href="./jasmine_favicon.png">
|
8
|
+
<link rel="stylesheet" type="text/css" href="./jasmine.css">
|
9
9
|
|
10
|
-
<script type="text/javascript" src="
|
11
|
-
<script type="text/javascript" src="
|
12
|
-
<script type="text/javascript" src="
|
13
|
-
<script type="text/javascript" src="
|
14
|
-
<script type="text/javascript" src="
|
15
|
-
<script type="text/javascript" src="
|
16
|
-
<script type="text/javascript" src="
|
17
|
-
<script type="text/javascript" src="
|
10
|
+
<script type="text/javascript" src="./jasmine.js"></script>
|
11
|
+
<script type="text/javascript" src="./jasmine-html.js"></script>
|
12
|
+
<script type="text/javascript" src="./console.js"></script>
|
13
|
+
<script type="text/javascript" src="./jasmine2-junit.js"></script>
|
14
|
+
<script type="text/javascript" src="./boot.js"></script>
|
15
|
+
<script type="text/javascript" src="./jquery-1.8.0.min.js"></script>
|
16
|
+
<script type="text/javascript" src="./jquery-ui-1.8.23.custom.min.js"></script>
|
17
|
+
<script type="text/javascript" src="./jasmine-jquery.js"></script>
|
18
18
|
|
19
19
|
|
20
20
|
<script>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<script type="text/javascript" src="<%= js_file %>"></script>
|
27
27
|
<% end %>
|
28
28
|
|
29
|
-
<script type="text/javascript" src="
|
29
|
+
<script type="text/javascript" src="./ConsoleHelper.js"></script>
|
30
30
|
</head>
|
31
31
|
|
32
32
|
<body>
|
@@ -4,18 +4,18 @@
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<title>Jasmine Spec Runner v2.0.0</title>
|
6
6
|
|
7
|
-
<link rel="shortcut icon" type="image/png" href="
|
8
|
-
<link rel="stylesheet" type="text/css" href="
|
7
|
+
<link rel="shortcut icon" type="image/png" href="./jasmine_favicon.png">
|
8
|
+
<link rel="stylesheet" type="text/css" href="./jasmine.css">
|
9
9
|
|
10
|
-
<script type="text/javascript" src="
|
11
|
-
<script type="text/javascript" src="
|
12
|
-
<script type="text/javascript" src="
|
13
|
-
<script type="text/javascript" src="
|
14
|
-
<script type="text/javascript" src="
|
10
|
+
<script type="text/javascript" src="./jasmine.js"></script>
|
11
|
+
<script type="text/javascript" src="./jasmine-html.js"></script>
|
12
|
+
<script type="text/javascript" src="./console.js"></script>
|
13
|
+
<script type="text/javascript" src="./jasmine2-junit.js"></script>
|
14
|
+
<script type="text/javascript" src="./boot.js"></script>
|
15
15
|
|
16
|
-
<script type="text/javascript" src="
|
17
|
-
<script type="text/javascript" src="
|
18
|
-
<script type="text/javascript" src="
|
16
|
+
<script type="text/javascript" src="./jquery-1.8.0.min.js"></script>
|
17
|
+
<script type="text/javascript" src="./jquery-ui-1.8.23.custom.min.js"></script>
|
18
|
+
<script type="text/javascript" src="./jasmine-jquery.js"></script>
|
19
19
|
|
20
20
|
<script>
|
21
21
|
var currentTestPath = "<%= @current_test_path %>";
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<script type="text/javascript" src="<%= js_file %>"></script>
|
27
27
|
<% end %>
|
28
28
|
|
29
|
-
<script type="text/javascript" src="
|
29
|
+
<script type="text/javascript" src="./ConsoleHelperNoColor.js"></script>
|
30
30
|
</head>
|
31
31
|
|
32
32
|
<body>
|
data/lib/learn_test/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: learn-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flatiron School
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|