opal-minitest 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -3
- data/README.md +5 -5
- data/Rakefile +1 -1
- data/example/Gemfile +1 -2
- data/example/Rakefile +1 -2
- data/example/opal/bacterium.rb +10 -0
- data/example/test/bacterium_test.rb +9 -3
- data/example/test/test_helper.rb +1 -1
- data/lib/opal/minitest/rake_task.rb +4 -3
- data/lib/opal/minitest/version.rb +1 -1
- data/opal-minitest.gemspec +7 -5
- data/opal/opal/minitest/loader.rb.erb +5 -5
- data/vendor/runner.js +3 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba8c2924d574f50f708f738f8d873557d07642c5
|
4
|
+
data.tar.gz: 05e850d0ddd55515e9bcc4b94ff4f6cfe2144151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f87debdef932a42ce1063e41d4fe442973fb2f6c91061254f31fcadc6212495fa762db1d831d33fb08634e00c77b115c468fba8dd1ed8d902f940b57e81615d3
|
7
|
+
data.tar.gz: 896d04fe40f67de7afcea40209f09a62a8d8204aefe363e5446e93289721c1b66ee717299c3c5a00650c5a043290d3fde94f7e265ee9f94b2f00cffcdcf9b9f1
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -13,20 +13,20 @@ gem 'opal-minitest'
|
|
13
13
|
|
14
14
|
`$ bundle install`
|
15
15
|
|
16
|
-
|
16
|
+
Include the Rake task in a Rakefile, then run `rake` to run the project's tests.
|
17
17
|
|
18
18
|
```ruby
|
19
19
|
# Rakefile
|
20
20
|
require 'opal/minitest/rake_task'
|
21
|
-
Opal::Minitest::RakeTask.new
|
21
|
+
Opal::Minitest::RakeTask.new
|
22
22
|
```
|
23
23
|
|
24
24
|
`$ bundle exec rake`
|
25
25
|
|
26
|
-
This will run all Ruby/Opal files ending in `_test` in the `test/` directory, after an optional `test_helper` file
|
26
|
+
This will run all Ruby/Opal files ending in `_test` in the `test/` directory, after an optional `test_helper` file. Try the example!
|
27
27
|
|
28
28
|
## Status
|
29
29
|
|
30
|
-
Opal Minitest can
|
30
|
+
Opal Minitest can do everything regular Minitest can, except parallel running, plugins, CLI options, and `#capture_subprocess_io`.
|
31
31
|
|
32
|
-
|
32
|
+
All code differences from regular Minitest are documented with the label `PORT`.
|
data/Rakefile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'opal/minitest/rake_task'
|
2
|
-
Opal::Minitest::RakeTask.new
|
2
|
+
Opal::Minitest::RakeTask.new
|
data/example/Gemfile
CHANGED
data/example/Rakefile
CHANGED
@@ -3,8 +3,7 @@ require 'opal/minitest/rake_task'
|
|
3
3
|
# Register code in /opal with Opal.
|
4
4
|
Opal.append_path File.expand_path('../opal', __FILE__)
|
5
5
|
|
6
|
-
Opal::Minitest::RakeTask.new
|
7
|
-
|
6
|
+
Opal::Minitest::RakeTask.new
|
8
7
|
|
9
8
|
desc "Run tests through regular Minitest"
|
10
9
|
task('regtest') do
|
data/example/opal/bacterium.rb
CHANGED
@@ -2,10 +2,16 @@ require 'bacterium'
|
|
2
2
|
|
3
3
|
class BacteriumTest < Minitest::Test
|
4
4
|
def setup
|
5
|
-
@
|
5
|
+
@bacterium = Bacterium.new
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
assert_equal(@
|
8
|
+
def test_reproduce_returns_clone
|
9
|
+
assert_equal(@bacterium.reproduce.class, @bacterium.class)
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_eat_adds_bacterium_to_food
|
13
|
+
object = Object.new
|
14
|
+
@bacterium.eat(object)
|
15
|
+
assert_includes(@bacterium.food, object)
|
10
16
|
end
|
11
17
|
end
|
data/example/test/test_helper.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
puts "
|
1
|
+
puts "Use test_helper.rb to define helpful methods for your tests."
|
@@ -8,13 +8,14 @@ module Opal
|
|
8
8
|
|
9
9
|
RUNNER_PATH = File.expand_path('../../../../vendor/runner.js', __FILE__)
|
10
10
|
|
11
|
-
def initialize(args)
|
11
|
+
def initialize(args = {})
|
12
12
|
args = defaults.merge(args)
|
13
13
|
|
14
14
|
desc "Run tests through opal-minitest"
|
15
15
|
task(args[:name]) do
|
16
16
|
require 'rack'
|
17
17
|
require 'webrick'
|
18
|
+
require 'tilt/erb'
|
18
19
|
|
19
20
|
server = fork {
|
20
21
|
Rack::Server.start(
|
@@ -25,7 +26,7 @@ module Opal
|
|
25
26
|
AccessLog: [])
|
26
27
|
}
|
27
28
|
|
28
|
-
system "phantomjs #{RUNNER_PATH} \"http://localhost:#{args[:port]}\""
|
29
|
+
system "phantomjs \"#{RUNNER_PATH}\" \"http://localhost:#{args[:port]}\""
|
29
30
|
|
30
31
|
Process.kill(:SIGINT, server)
|
31
32
|
Process.wait
|
@@ -36,7 +37,7 @@ module Opal
|
|
36
37
|
|
37
38
|
def defaults
|
38
39
|
{
|
39
|
-
name: '
|
40
|
+
name: 'default',
|
40
41
|
port: 2838,
|
41
42
|
requires_glob: 'test/{test_helper,**/*_test}.{rb,opal}'
|
42
43
|
}
|
data/opal-minitest.gemspec
CHANGED
@@ -7,17 +7,19 @@ require 'opal/minitest/version'
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = 'opal-minitest'
|
9
9
|
s.version = Opal::Minitest::VERSION
|
10
|
-
s.author = 'Artur Ostrega'
|
11
|
-
s.email = 'skoofoo@gmail.com'
|
12
10
|
s.summary = 'Minitest, now for Opal!'
|
13
11
|
s.description = 'Minitest test runner for Opal'
|
12
|
+
s.license = 'MIT'
|
13
|
+
s.homepage = 'https://github.com/aost/opal-minitest'
|
14
|
+
s.author = 'Artur Ostręga'
|
15
|
+
s.email = 'artmarost@gmail.com'
|
14
16
|
|
15
17
|
s.files = `git ls-files`.split("\n")
|
16
18
|
|
17
|
-
s.require_paths
|
19
|
+
s.require_paths = ['lib']
|
18
20
|
|
19
|
-
s.add_dependency 'opal', '>= 0.
|
20
|
-
s.add_dependency 'rake', '~> 10
|
21
|
+
s.add_dependency 'opal', '>= 0.8'
|
22
|
+
s.add_dependency 'rake', '~> 10'
|
21
23
|
s.add_development_dependency 'minitest', '5.3.4'
|
22
24
|
end
|
23
25
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'opal'
|
2
|
+
require 'minitest'
|
3
3
|
|
4
|
-
<% Dir[$omt_requires_glob].each
|
5
|
-
|
6
|
-
|
4
|
+
<% Dir[$omt_requires_glob].each do |file| %>
|
5
|
+
require <%= file.sub(/^test\//, '').sub(/\.{rb,opal}$/, '').inspect %>
|
6
|
+
<% end %>
|
7
7
|
|
8
8
|
Minitest.run
|
data/vendor/runner.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Artur
|
7
|
+
- Artur Ostręga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '10
|
33
|
+
version: '10'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '10
|
40
|
+
version: '10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 5.3.4
|
55
55
|
description: Minitest test runner for Opal
|
56
|
-
email:
|
56
|
+
email: artmarost@gmail.com
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files: []
|
@@ -80,8 +80,9 @@ files:
|
|
80
80
|
- opal/opal/minitest/runner.html.erb
|
81
81
|
- test/example_test.rb
|
82
82
|
- vendor/runner.js
|
83
|
-
homepage:
|
84
|
-
licenses:
|
83
|
+
homepage: https://github.com/aost/opal-minitest
|
84
|
+
licenses:
|
85
|
+
- MIT
|
85
86
|
metadata: {}
|
86
87
|
post_install_message:
|
87
88
|
rdoc_options: []
|
@@ -99,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
100
|
version: '0'
|
100
101
|
requirements: []
|
101
102
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.0.14
|
103
104
|
signing_key:
|
104
105
|
specification_version: 4
|
105
106
|
summary: Minitest, now for Opal!
|