Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
ef27dbc9
Commit
ef27dbc9
authored
Aug 09, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding new test structure
parent
7eb716b5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
181 additions
and
0 deletions
+181
-0
Gemfile
test/Gemfile
+1
-0
Gemfile.lock
test/Gemfile.lock
+26
-0
Rakefile
test/Rakefile
+9
-0
PushStreamSpec.js
test/spec/javascripts/PushStreamSpec.js
+10
-0
SpecHelper.js
test/spec/javascripts/helpers/SpecHelper.js
+4
-0
jasmine.yml
test/spec/javascripts/support/jasmine.yml
+76
-0
jasmine_config.rb
test/spec/javascripts/support/jasmine_config.rb
+23
-0
jasmine_runner.rb
test/spec/javascripts/support/jasmine_runner.rb
+32
-0
No files found.
test/Gemfile
View file @
ef27dbc9
...
...
@@ -6,6 +6,7 @@ group :test do
gem
'POpen4'
,
'0.1.4'
gem
'em-http-request'
,
'0.2.14'
gem
'json'
,
'1.4.3'
gem
'jasmine'
,
'1.0.2.1'
platforms
:mri_18
do
gem
"ruby-debug"
...
...
test/Gemfile.lock
View file @
ef27dbc9
...
...
@@ -8,18 +8,37 @@ GEM
RedCloth (4.2.7)
addressable (2.2.2)
archive-tar-minitar (0.5.2)
childprocess (0.2.0)
ffi (~> 1.0.6)
columnize (0.3.2)
diff-lcs (1.1.2)
em-http-request (0.2.14)
addressable (>= 2.0.0)
eventmachine (>= 0.12.9)
eventmachine (0.12.10)
ffi (1.0.9)
github-markup (0.5.3)
jasmine (1.0.2.1)
json_pure (>= 1.4.3)
rack (>= 1.1)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
json (1.4.3)
json_pure (1.5.3)
linecache (0.43)
linecache19 (0.5.11)
ruby_core_source (>= 0.1.4)
open4 (1.0.1)
rack (1.3.2)
rake (0.8.7)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
...
...
@@ -35,6 +54,12 @@ GEM
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.4)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
selenium-webdriver (2.3.2)
childprocess (>= 0.1.9)
ffi (>= 1.0.7)
json_pure
rubyzip
PLATFORMS
ruby
...
...
@@ -44,6 +69,7 @@ DEPENDENCIES
RedCloth
em-http-request (= 0.2.14)
github-markup
jasmine (= 1.0.2.1)
json (= 1.4.3)
rake
ruby-debug
...
...
test/Rakefile
View file @
ef27dbc9
...
...
@@ -34,3 +34,12 @@ task :tests, :executable, :host, :port, :workers, :tests_tmp_dir do |t, args|
require
test_case
end
end
begin
require
'jasmine'
load
'jasmine/tasks/jasmine.rake'
rescue
LoadError
task
:jasmine
do
abort
"Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
end
end
test/spec/javascripts/PushStreamSpec.js
0 → 100644
View file @
ef27dbc9
describe
(
"
PushStream
"
,
function
()
{
beforeEach
(
function
()
{
});
it
(
"
should use default port
"
,
function
()
{
expect
(
PushStream
.
port
).
toEqual
(
80
);
});
});
test/spec/javascripts/helpers/SpecHelper.js
0 → 100644
View file @
ef27dbc9
beforeEach
(
function
()
{
this
.
addMatchers
({
})
});
test/spec/javascripts/support/jasmine.yml
0 → 100644
View file @
ef27dbc9
# src_files
#
# Return an array of filepaths relative to src_dir to include before jasmine specs.
# Default: []
#
# EXAMPLE:
#
# src_files:
# - lib/source1.js
# - lib/source2.js
# - dist/**/*.js
#
src_files
:
-
misc/examples/js/jquery-1.4.2.min.js
-
misc/examples/js/log4js.js
-
misc/examples/js/pushstream.js
# stylesheets
#
# Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
# Default: []
#
# EXAMPLE:
#
# stylesheets:
# - css/style.css
# - stylesheets/*.css
#
stylesheets
:
# helpers
#
# Return an array of filepaths relative to spec_dir to include before jasmine specs.
# Default: ["helpers/**/*.js"]
#
# EXAMPLE:
#
# helpers:
# - helpers/**/*.js
#
helpers
:
# spec_files
#
# Return an array of filepaths relative to spec_dir to include.
# Default: ["**/*[sS]pec.js"]
#
# EXAMPLE:
#
# spec_files:
# - **/*[sS]pec.js
#
spec_files
:
# src_dir
#
# Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
# Default: project root
#
# EXAMPLE:
#
# src_dir: public
#
src_dir
:
../
# spec_dir
#
# Spec directory path. Your spec_files must be returned relative to this path.
# Default: spec/javascripts
#
# EXAMPLE:
#
# spec_dir: spec/javascripts
#
spec_dir
:
test/spec/javascripts/support/jasmine_config.rb
0 → 100644
View file @
ef27dbc9
module
Jasmine
class
Config
# Add your overrides or custom config code here
end
end
# Note - this is necessary for rspec2, which has removed the backtrace
module
Jasmine
class
SpecBuilder
def
declare_spec
(
parent
,
spec
)
me
=
self
example_name
=
spec
[
"name"
]
@spec_ids
<<
spec
[
"id"
]
backtrace
=
@example_locations
[
parent
.
description
+
" "
+
example_name
]
parent
.
it
example_name
,
{}
do
me
.
report_spec
(
spec
[
"id"
])
end
end
end
end
test/spec/javascripts/support/jasmine_runner.rb
0 → 100644
View file @
ef27dbc9
$:
.
unshift
(
ENV
[
'JASMINE_GEM_PATH'
])
if
ENV
[
'JASMINE_GEM_PATH'
]
# for gem testing purposes
require
'rubygems'
require
'jasmine'
jasmine_config_overrides
=
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'jasmine_config.rb'
))
require
jasmine_config_overrides
if
File
.
exist?
(
jasmine_config_overrides
)
if
Jasmine
::
rspec2?
require
'rspec'
else
require
'spec'
end
jasmine_config
=
Jasmine
::
Config
.
new
spec_builder
=
Jasmine
::
SpecBuilder
.
new
(
jasmine_config
)
should_stop
=
false
if
Jasmine
::
rspec2?
RSpec
.
configuration
.
after
(
:suite
)
do
spec_builder
.
stop
if
should_stop
end
else
Spec
::
Runner
.
configure
do
|
config
|
config
.
after
(
:suite
)
do
spec_builder
.
stop
if
should_stop
end
end
end
spec_builder
.
start
should_stop
=
true
spec_builder
.
declare_suites
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment