opal-rspec 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/lib/opal/rspec/rake_task.rb +14 -9
- data/lib/opal/rspec/version.rb +1 -1
- data/opal/opal/rspec/fixes.rb +36 -0
- data/opal-rspec.gemspec +1 -1
- data/spec/mock_spec.rb +6 -0
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e842ffe93edffeb7e5f97c5ebd881053b61642
|
4
|
+
data.tar.gz: ea64cb916e97deaa54763bf386ca1e63d08ea832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d14e6849697b8cca91f618cfabf52ff6abcbc95e7f721949abf3ef250a5606bf9b4a109888f53acf11703407669111fd82e696309d9021b8061d5e129bebd34
|
7
|
+
data.tar.gz: f8d41ede39787d54ddf1e6d859ff9adb7d3e2c271f9bd0a62359bd4580c2f2288463caad92cb41f931abd0e34fe559d4f6f03aee7bebb314b14f6ee0b303fc2a
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
##
|
1
|
+
## 0.4.3 (2015-06-14)
|
2
|
+
|
3
|
+
* Allow the gem to be run under Opal 0.7 and 0.8
|
4
|
+
* Fix some threading issues
|
5
|
+
* Avoid some other calls to mutable-strings methods
|
6
|
+
|
7
|
+
## 0.4.2 (2015-03-28)
|
8
|
+
|
9
|
+
* Avoid phantomjs warning messages
|
10
|
+
|
11
|
+
## 0.4.1
|
2
12
|
|
3
13
|
* Remove predicate matcher fixes as Opal supports $1..$9 special gvars.
|
4
14
|
|
data/lib/opal/rspec/rake_task.rb
CHANGED
@@ -15,17 +15,22 @@ module Opal
|
|
15
15
|
require 'rack'
|
16
16
|
require 'webrick'
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
s.debug = false
|
18
|
+
app = Opal::Server.new { |s|
|
19
|
+
s.main = 'opal/rspec/sprockets_runner'
|
20
|
+
s.append_path 'spec'
|
21
|
+
s.debug = false
|
23
22
|
|
24
|
-
|
25
|
-
|
23
|
+
block.call s if block
|
24
|
+
}
|
26
25
|
|
27
|
-
|
28
|
-
|
26
|
+
server = Thread.new do
|
27
|
+
Thread.current.abort_on_exception = true
|
28
|
+
Rack::Server.start(
|
29
|
+
:app => app,
|
30
|
+
:Port => PORT,
|
31
|
+
:AccessLog => [],
|
32
|
+
:Logger => WEBrick::Log.new("/dev/null"),
|
33
|
+
)
|
29
34
|
end
|
30
35
|
|
31
36
|
if `phantomjs -v`.strip.to_i >= 2
|
data/lib/opal/rspec/version.rb
CHANGED
data/opal/opal/rspec/fixes.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'encoding'
|
2
|
+
|
1
3
|
# This breaks on 2.0.0, so it is here ready for when opal bumps to 2.0.0
|
2
4
|
class RSpec::CallerFilter
|
3
5
|
def self.first_non_rspec_line
|
@@ -78,3 +80,37 @@ module RSpec
|
|
78
80
|
end
|
79
81
|
end
|
80
82
|
end
|
83
|
+
|
84
|
+
RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage.class_eval do
|
85
|
+
def to_s
|
86
|
+
msg = "#{@data[:deprecated]} is deprecated."
|
87
|
+
msg += " Use #{@data[:replacement]} instead." if @data[:replacement]
|
88
|
+
msg += " Called from #{@data[:call_site]}." if @data[:call_site]
|
89
|
+
msg
|
90
|
+
end
|
91
|
+
|
92
|
+
def too_many_warnings_message
|
93
|
+
msg = "Too many uses of deprecated '#{type}'."
|
94
|
+
msg += " Set config.deprecation_stream to a File for full output."
|
95
|
+
msg
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def (RSpec::Expectations).fail_with(message, expected=nil, actual=nil)
|
100
|
+
if !message
|
101
|
+
raise ArgumentError, "Failure message is nil. Does your matcher define the " +
|
102
|
+
"appropriate failure_message_for_* method to return a string?"
|
103
|
+
end
|
104
|
+
|
105
|
+
if actual && expected
|
106
|
+
if all_strings?(actual, expected)
|
107
|
+
if any_multiline_strings?(actual, expected)
|
108
|
+
message # + "\nDiff:" + differ.diff_as_string(coerce_to_string(actual), coerce_to_string(expected))
|
109
|
+
end
|
110
|
+
elsif no_procs?(actual, expected) && no_numbers?(actual, expected)
|
111
|
+
message # + "\nDiff:" + differ.diff_as_object(actual, expected)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
raise(RSpec::Expectations::ExpectationNotMetError.new(message))
|
116
|
+
end
|
data/opal-rspec.gemspec
CHANGED
data/spec/mock_spec.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Beynon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.7.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.9'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.7.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.9'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rake
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|