opal-rspec 0.0.1.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/Gemfile +15 -0
- data/README.md +78 -0
- data/Rakefile +46 -0
- data/app/rspec-builder.rb +10 -0
- data/app/rspec/core.rb +202 -0
- data/app/rspec/core/configuration.rb +1070 -0
- data/app/rspec/core/example_group.rb +573 -0
- data/app/rspec/core/project_initializer.rb +0 -0
- data/app/rspec/core/shared_example_group.rb +146 -0
- data/app/rspec/core/shared_example_group/collection.rb +27 -0
- data/app/rspec/matchers/built_in/have.rb +0 -0
- data/config.ru +10 -0
- data/lib/opal-rspec.rb +2 -0
- data/lib/opal/rspec.rb +6 -0
- data/lib/opal/rspec/rake_task.rb +44 -0
- data/lib/opal/rspec/version.rb +6 -0
- data/opal-rspec.gemspec +23 -0
- data/opal/opal-rspec.rb +1 -0
- data/opal/opal/rspec.rb +21 -0
- data/opal/opal/rspec/browser_formatter.rb +194 -0
- data/opal/opal/rspec/fixes.rb +62 -0
- data/opal/opal/rspec/runner.rb +52 -0
- data/opal/opal/rspec/sprockets_runner.rb.erb +11 -0
- data/opal/opal/rspec/text_formatter.rb +74 -0
- data/spec/example_spec.rb +143 -0
- data/spec/matchers_spec.rb +181 -0
- data/vendor/spec_runner.js +41 -0
- metadata +113 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
/*
|
2
|
+
* Test runner for phantomjs
|
3
|
+
*/
|
4
|
+
var args = phantom.args;
|
5
|
+
var page = require('webpage').create();
|
6
|
+
|
7
|
+
page.onConsoleMessage = function(msg) {
|
8
|
+
console.log(msg);
|
9
|
+
};
|
10
|
+
|
11
|
+
page.onInitialized = function() {
|
12
|
+
page.evaluate(function () {
|
13
|
+
window.OPAL_SPEC_PHANTOM = true;
|
14
|
+
});
|
15
|
+
};
|
16
|
+
|
17
|
+
page.open(args[0], function(status) {
|
18
|
+
if (status !== 'success') {
|
19
|
+
console.error("Cannot load: " + args[0]);
|
20
|
+
phantom.exit(1);
|
21
|
+
} else {
|
22
|
+
var timeout = parseInt(args[1] || 60000, 10);
|
23
|
+
var start = Date.now();
|
24
|
+
var interval = setInterval(function() {
|
25
|
+
if (Date.now() > start + timeout) {
|
26
|
+
console.error("Specs timed out");
|
27
|
+
phantom.exit(124);
|
28
|
+
} else {
|
29
|
+
var code = page.evaluate(function() {
|
30
|
+
return window.OPAL_SPEC_CODE;
|
31
|
+
});
|
32
|
+
|
33
|
+
if (code === 0 || code === 1) {
|
34
|
+
clearInterval(interval);
|
35
|
+
phantom.exit(code);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}, 500);
|
39
|
+
}
|
40
|
+
});
|
41
|
+
|
metadata
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: opal-rspec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.beta1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Beynon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: opal
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.4.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.4.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opal-sprockets
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Opal compatible rspec library
|
56
|
+
email: adam.beynon@gmail.com
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- .gitignore
|
62
|
+
- Gemfile
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- app/rspec-builder.rb
|
66
|
+
- app/rspec/core.rb
|
67
|
+
- app/rspec/core/configuration.rb
|
68
|
+
- app/rspec/core/example_group.rb
|
69
|
+
- app/rspec/core/project_initializer.rb
|
70
|
+
- app/rspec/core/shared_example_group.rb
|
71
|
+
- app/rspec/core/shared_example_group/collection.rb
|
72
|
+
- app/rspec/matchers/built_in/have.rb
|
73
|
+
- config.ru
|
74
|
+
- lib/opal-rspec.rb
|
75
|
+
- lib/opal/rspec.rb
|
76
|
+
- lib/opal/rspec/rake_task.rb
|
77
|
+
- lib/opal/rspec/version.rb
|
78
|
+
- opal-rspec.gemspec
|
79
|
+
- opal/opal-rspec.rb
|
80
|
+
- opal/opal/rspec.rb
|
81
|
+
- opal/opal/rspec/browser_formatter.rb
|
82
|
+
- opal/opal/rspec/fixes.rb
|
83
|
+
- opal/opal/rspec/runner.rb
|
84
|
+
- opal/opal/rspec/sprockets_runner.rb.erb
|
85
|
+
- opal/opal/rspec/text_formatter.rb
|
86
|
+
- spec/example_spec.rb
|
87
|
+
- spec/matchers_spec.rb
|
88
|
+
- vendor/spec_runner.js
|
89
|
+
- opal/opal/rspec/rspec.js
|
90
|
+
homepage: http://opalrb.org
|
91
|
+
licenses: []
|
92
|
+
metadata: {}
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '>'
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 1.3.1
|
107
|
+
requirements: []
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 2.1.9
|
110
|
+
signing_key:
|
111
|
+
specification_version: 4
|
112
|
+
summary: RSpec for Opal
|
113
|
+
test_files: []
|