rspec-jasmine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/example/.rspec +1 -0
- data/example/Gemfile +7 -0
- data/example/README.md +18 -0
- data/example/Rakefile +18 -0
- data/example/config.ru +5 -0
- data/example/public/lib/jasmine-1.2.0/MIT.LICENSE +20 -0
- data/example/public/lib/jasmine-1.2.0/jasmine-html.js +616 -0
- data/example/public/lib/jasmine-1.2.0/jasmine.css +81 -0
- data/example/public/lib/jasmine-1.2.0/jasmine.js +2529 -0
- data/example/public/spec/PlayerSpec.js +58 -0
- data/example/public/spec/SpecHelper.js +9 -0
- data/example/public/src/Player.js +22 -0
- data/example/public/src/Song.js +7 -0
- data/example/public/tests.html +61 -0
- data/example/spec/jasmine.rb +13 -0
- data/example/spec/spec_helper.rb +6 -0
- data/lib/rspec-jasmine.rb +2 -0
- data/lib/rspec/jasmine.rb +9 -0
- data/lib/rspec/jasmine/example.rb +46 -0
- data/lib/rspec/jasmine/example_result.rb +45 -0
- data/lib/rspec/jasmine/selenium_driver.rb +56 -0
- data/lib/rspec/jasmine/spec_builder.rb +130 -0
- data/lib/rspec/jasmine/spec_runner.rb +44 -0
- data/lib/rspec/jasmine/version.rb +5 -0
- data/rspec-jasmine.gemspec +25 -0
- data/spec/.gitkeep +0 -0
- metadata +142 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'rspec/jasmine/spec_builder'
|
2
|
+
require 'rack'
|
3
|
+
require 'rack/server'
|
4
|
+
|
5
|
+
module RSpec
|
6
|
+
module Jasmine
|
7
|
+
class SpecRunner
|
8
|
+
def self.run(world, options = {})
|
9
|
+
suites = options[:suites] || ENV['JASMINE_SUITES'].to_s.split(':')
|
10
|
+
return if suites.empty?
|
11
|
+
|
12
|
+
builders = suites.map do |suite|
|
13
|
+
RSpec::Jasmine::SpecBuilder.new(world, options.merge(:suite => suite))
|
14
|
+
end
|
15
|
+
|
16
|
+
first_builder = builders.first
|
17
|
+
|
18
|
+
Thread.new do
|
19
|
+
Rack::Server.new({
|
20
|
+
:app => options[:app],
|
21
|
+
:Port => first_builder.port,
|
22
|
+
:Host => first_builder.host,
|
23
|
+
}).start { |s| s.silent = true }
|
24
|
+
end
|
25
|
+
|
26
|
+
require 'rspec/core/runner'
|
27
|
+
|
28
|
+
builders.each_with_index do |builder, id|
|
29
|
+
RSpec.configuration.after(:suite) do
|
30
|
+
builder.stop
|
31
|
+
end
|
32
|
+
|
33
|
+
puts if id > 0
|
34
|
+
builder.start
|
35
|
+
RSpec::Core::Runner.run([])
|
36
|
+
end
|
37
|
+
|
38
|
+
if Jasmine.failed
|
39
|
+
exit(1)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/rspec/jasmine/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Chris Kowalik"]
|
6
|
+
gem.email = ["chris@nu7hat.ch"]
|
7
|
+
gem.homepage = "http://github.com/nu7hatch/rspec-jasmine"
|
8
|
+
gem.description = %q{Jasmine runner and reporter for RSpec}
|
9
|
+
gem.summary = %Q{
|
10
|
+
This gem provides a neat runner and reporter for Jasmine compatible
|
11
|
+
with all the features of RSpec.
|
12
|
+
}
|
13
|
+
|
14
|
+
gem.files = `git ls-files`.split($\)
|
15
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
|
+
gem.name = "rspec-jasmine"
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
gem.version = RSpec::Jasmine::VERSION
|
20
|
+
|
21
|
+
gem.add_dependency "rspec", ">= 2.0"
|
22
|
+
gem.add_dependency "selenium-webdriver"
|
23
|
+
gem.add_dependency "rack"
|
24
|
+
gem.add_dependency "json"
|
25
|
+
end
|
data/spec/.gitkeep
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec-jasmine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Chris Kowalik
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: selenium-webdriver
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rack
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: json
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Jasmine runner and reporter for RSpec
|
79
|
+
email:
|
80
|
+
- chris@nu7hat.ch
|
81
|
+
executables: []
|
82
|
+
extensions: []
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- .gitignore
|
86
|
+
- Gemfile
|
87
|
+
- LICENSE
|
88
|
+
- README.md
|
89
|
+
- Rakefile
|
90
|
+
- example/.rspec
|
91
|
+
- example/Gemfile
|
92
|
+
- example/README.md
|
93
|
+
- example/Rakefile
|
94
|
+
- example/config.ru
|
95
|
+
- example/public/lib/jasmine-1.2.0/MIT.LICENSE
|
96
|
+
- example/public/lib/jasmine-1.2.0/jasmine-html.js
|
97
|
+
- example/public/lib/jasmine-1.2.0/jasmine.css
|
98
|
+
- example/public/lib/jasmine-1.2.0/jasmine.js
|
99
|
+
- example/public/spec/PlayerSpec.js
|
100
|
+
- example/public/spec/SpecHelper.js
|
101
|
+
- example/public/src/Player.js
|
102
|
+
- example/public/src/Song.js
|
103
|
+
- example/public/tests.html
|
104
|
+
- example/spec/jasmine.rb
|
105
|
+
- example/spec/spec_helper.rb
|
106
|
+
- lib/rspec-jasmine.rb
|
107
|
+
- lib/rspec/jasmine.rb
|
108
|
+
- lib/rspec/jasmine/example.rb
|
109
|
+
- lib/rspec/jasmine/example_result.rb
|
110
|
+
- lib/rspec/jasmine/selenium_driver.rb
|
111
|
+
- lib/rspec/jasmine/spec_builder.rb
|
112
|
+
- lib/rspec/jasmine/spec_runner.rb
|
113
|
+
- lib/rspec/jasmine/version.rb
|
114
|
+
- rspec-jasmine.gemspec
|
115
|
+
- spec/.gitkeep
|
116
|
+
homepage: http://github.com/nu7hatch/rspec-jasmine
|
117
|
+
licenses: []
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
requirements: []
|
135
|
+
rubyforge_project:
|
136
|
+
rubygems_version: 1.8.24
|
137
|
+
signing_key:
|
138
|
+
specification_version: 3
|
139
|
+
summary: This gem provides a neat runner and reporter for Jasmine compatible with
|
140
|
+
all the features of RSpec.
|
141
|
+
test_files:
|
142
|
+
- spec/.gitkeep
|