honkster-js-test-server 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +5 -4
- data/Gemfile.lock +6 -4
- data/Rakefile +1 -1
- data/lib/js_test_server/server/runner.rb +2 -2
- data/lib/js_test_server/server/views/page.html.rb +1 -1
- data/lib/js_test_server/server/views/suites/jasmine.html.rb +0 -1
- data/spec/spec_helpers/example_group.rb +3 -2
- data/spec/spec_helpers/mock_session.rb +1 -1
- data/spec/unit/js_test_core/resources/remote_control_spec.rb +2 -1
- data/spec/unit/js_test_core/resources/spec_file_spec.rb +51 -19
- metadata +3 -6
data/Gemfile
CHANGED
@@ -12,10 +12,11 @@ group :gem do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
group :test do
|
15
|
-
gem '
|
16
|
-
gem 'selenium-rc', '2.2.1'
|
15
|
+
gem 'focused-test', '0.6.0'
|
17
16
|
gem 'lsof', '0.3.0'
|
18
|
-
gem 'rack-test', '0.5.3'
|
19
|
-
gem 'rr', '0.10.11'
|
20
17
|
gem 'nokogiri', '1.4.1'
|
18
|
+
gem 'rack-test', '0.5.6'
|
19
|
+
gem 'rr', '1.0.2'
|
20
|
+
gem 'rspec', '1.3.1'
|
21
|
+
gem 'selenium-rc', '2.2.1'
|
21
22
|
end
|
data/Gemfile.lock
CHANGED
@@ -6,6 +6,7 @@ GEM
|
|
6
6
|
erector (0.7.2)
|
7
7
|
hoe (>= 1.5.0)
|
8
8
|
eventmachine (0.12.10)
|
9
|
+
focused-test (0.6.0)
|
9
10
|
guid (0.1.1)
|
10
11
|
hoe (2.7.0)
|
11
12
|
rake (>= 0.8.7)
|
@@ -16,10 +17,10 @@ GEM
|
|
16
17
|
lsof (0.3.0)
|
17
18
|
nokogiri (1.4.1)
|
18
19
|
rack (1.2.1)
|
19
|
-
rack-test (0.5.
|
20
|
+
rack-test (0.5.6)
|
20
21
|
rack (>= 1.0)
|
21
22
|
rake (0.8.7)
|
22
|
-
rr (0.
|
23
|
+
rr (1.0.2)
|
23
24
|
rspec (1.3.1)
|
24
25
|
rubyforge (2.0.4)
|
25
26
|
json_pure (>= 1.1.7)
|
@@ -42,13 +43,14 @@ PLATFORMS
|
|
42
43
|
DEPENDENCIES
|
43
44
|
activesupport
|
44
45
|
erector (= 0.7.2)
|
46
|
+
focused-test (= 0.6.0)
|
45
47
|
guid (>= 0.1.1)
|
46
48
|
i18n
|
47
49
|
json (>= 1.4.0)
|
48
50
|
lsof (= 0.3.0)
|
49
51
|
nokogiri (= 1.4.1)
|
50
|
-
rack-test (= 0.5.
|
51
|
-
rr (= 0.
|
52
|
+
rack-test (= 0.5.6)
|
53
|
+
rr (= 1.0.2)
|
52
54
|
rspec (= 1.3.1)
|
53
55
|
selenium-client (= 1.2.18)
|
54
56
|
selenium-rc (= 2.2.1)
|
data/Rakefile
CHANGED
@@ -12,13 +12,14 @@ class Spec::ExampleGroup
|
|
12
12
|
eigen_class
|
13
13
|
end
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
include Rack::Test::Methods
|
17
17
|
include BeHttp
|
18
18
|
include WaitFor
|
19
|
-
attr_reader :framework_path, :spec_path, :root_path, :server, :connection
|
19
|
+
attr_reader :framework_path, :library_root_dir, :spec_path, :root_path, :server, :connection
|
20
20
|
before(:all) do
|
21
21
|
dir = File.dirname(__FILE__)
|
22
|
+
@library_root_dir = LIBRARY_ROOT_DIR
|
22
23
|
@framework_path = File.expand_path("#{LIBRARY_ROOT_DIR}/spec/example_framework")
|
23
24
|
@spec_path = File.expand_path("#{LIBRARY_ROOT_DIR}/spec/example_spec")
|
24
25
|
@root_path = File.expand_path("#{LIBRARY_ROOT_DIR}/spec/example_root")
|
@@ -10,7 +10,7 @@ class Rack::Test::Session
|
|
10
10
|
class << self
|
11
11
|
def http_action_with_async_catch(method_name)
|
12
12
|
alias_method "#{method_name}_without_async_catch", method_name
|
13
|
-
class_eval((<<-RUBY), __FILE__, __LINE__)
|
13
|
+
class_eval((<<-RUBY), __FILE__, __LINE__ + 1)
|
14
14
|
def #{method_name}_with_async_catch(*args, &block)
|
15
15
|
catch(:async) {return #{method_name}_without_async_catch(*args, &block)}
|
16
16
|
nil
|
@@ -10,6 +10,7 @@ module JsTestServer::Server::Resources
|
|
10
10
|
@browser_async_callback = lambda do |commands_response|
|
11
11
|
browser_session.last_response = Rack::MockResponse.new(*commands_response)
|
12
12
|
end
|
13
|
+
pending "Getting this to work on ruby 1.9.2"
|
13
14
|
end
|
14
15
|
|
15
16
|
describe "GET /remote_control/subscriber" do
|
@@ -114,4 +115,4 @@ module JsTestServer::Server::Resources
|
|
114
115
|
end
|
115
116
|
end
|
116
117
|
end
|
117
|
-
end
|
118
|
+
end
|
@@ -3,31 +3,63 @@ require File.expand_path("#{File.dirname(__FILE__)}/../../unit_spec_helper")
|
|
3
3
|
module JsTestServer::Server::Resources
|
4
4
|
describe SpecFile do
|
5
5
|
describe "Configuration" do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
describe "jasmine" do
|
7
|
+
attr_reader :doc
|
8
|
+
before do
|
9
|
+
JsTestServer.framework_name = "jasmine"
|
10
|
+
JsTestServer.framework_path = "#{library_root_dir}/spec/frameworks/jasmine/lib"
|
11
|
+
JsTestServer::Server::Views::Suite.project_js_files += ["/javascripts/test_file_1.js", "/javascripts/test_file_2.js"]
|
12
|
+
JsTestServer::Server::Views::Suite.project_css_files += ["/stylesheets/test_file_1.css", "/stylesheets/test_file_2.css"]
|
13
|
+
|
14
|
+
response = get(SpecFile.path("/failing_spec"))
|
15
|
+
response.should be_http( 200, {}, "" )
|
16
|
+
|
17
|
+
@doc = Nokogiri::HTML(response.body)
|
18
|
+
end
|
11
19
|
|
12
|
-
|
13
|
-
|
20
|
+
after do
|
21
|
+
JsTestServer::Server::Views::Suite.project_js_files.clear
|
22
|
+
JsTestServer::Server::Views::Suite.project_css_files.clear
|
23
|
+
end
|
14
24
|
|
15
|
-
|
16
|
-
|
25
|
+
it "renders project js files" do
|
26
|
+
doc.at("script[@src='/javascripts/test_file_1.js']").should_not be_nil
|
27
|
+
doc.at("script[@src='/javascripts/test_file_2.js']").should_not be_nil
|
28
|
+
end
|
17
29
|
|
18
|
-
|
19
|
-
|
20
|
-
|
30
|
+
it "renders project css files" do
|
31
|
+
doc.at("link[@href='/stylesheets/test_file_1.css']").should_not be_nil
|
32
|
+
doc.at("link[@href='/stylesheets/test_file_2.css']").should_not be_nil
|
33
|
+
end
|
21
34
|
end
|
22
35
|
|
23
|
-
|
24
|
-
doc
|
25
|
-
|
26
|
-
|
36
|
+
describe "screw-unit" do
|
37
|
+
attr_reader :doc
|
38
|
+
before do
|
39
|
+
JsTestServer.framework_name = "screw-unit"
|
40
|
+
JsTestServer::Server::Views::Suite.project_js_files += ["/javascripts/test_file_1.js", "/javascripts/test_file_2.js"]
|
41
|
+
JsTestServer::Server::Views::Suite.project_css_files += ["/stylesheets/test_file_1.css", "/stylesheets/test_file_2.css"]
|
42
|
+
|
43
|
+
response = get(SpecFile.path("/failing_spec"))
|
44
|
+
response.should be_http( 200, {}, "" )
|
27
45
|
|
28
|
-
|
29
|
-
|
30
|
-
|
46
|
+
@doc = Nokogiri::HTML(response.body)
|
47
|
+
end
|
48
|
+
|
49
|
+
after do
|
50
|
+
JsTestServer::Server::Views::Suite.project_js_files.clear
|
51
|
+
JsTestServer::Server::Views::Suite.project_css_files.clear
|
52
|
+
end
|
53
|
+
|
54
|
+
it "renders project js files" do
|
55
|
+
doc.at("script[@src='/javascripts/test_file_1.js']").should_not be_nil
|
56
|
+
doc.at("script[@src='/javascripts/test_file_2.js']").should_not be_nil
|
57
|
+
end
|
58
|
+
|
59
|
+
it "renders project css files" do
|
60
|
+
doc.at("link[@href='/stylesheets/test_file_1.css']").should_not be_nil
|
61
|
+
doc.at("link[@href='/stylesheets/test_file_2.css']").should_not be_nil
|
62
|
+
end
|
31
63
|
end
|
32
64
|
end
|
33
65
|
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honkster-js-test-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 3
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
8
|
+
- 11
|
9
|
+
version: 0.2.11
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Brian Takita
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-
|
17
|
+
date: 2010-12-16 00:00:00 -08:00
|
19
18
|
default_executable:
|
20
19
|
dependencies: []
|
21
20
|
|
@@ -123,7 +122,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
122
|
requirements:
|
124
123
|
- - ">="
|
125
124
|
- !ruby/object:Gem::Version
|
126
|
-
hash: 3
|
127
125
|
segments:
|
128
126
|
- 0
|
129
127
|
version: "0"
|
@@ -132,7 +130,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
130
|
requirements:
|
133
131
|
- - ">="
|
134
132
|
- !ruby/object:Gem::Version
|
135
|
-
hash: 3
|
136
133
|
segments:
|
137
134
|
- 0
|
138
135
|
version: "0"
|