File tree 3 files changed +22
-8
lines changed
3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 1
1
## edge
2
2
3
+ * Remove predicate matcher fixes as Opal supports $1..$9 special gvars.
4
+
3
5
* Update Opal dependency for ~ > 0.6.0.
4
6
5
7
* Remove double-escaping in inline x-strings (from Opal bug fix).
Original file line number Diff line number Diff line change @@ -42,14 +42,6 @@ def underscore(camel_cased_word)
42
42
end
43
43
end
44
44
45
- # Opal does not yet support $1..$9 backrefs
46
- class RSpec ::Matchers ::BuiltIn ::BePredicate
47
- def prefix_and_expected ( symbol )
48
- symbol . to_s =~ /^(be_(an?_)?)(.*)/
49
- return $~[ 1 ] , $~[ 3 ]
50
- end
51
- end
52
-
53
45
module RSpec ::ExampleGroups
54
46
# opal cannot use mutable strings AND opal doesnt support `\A` or `\z` anchors
55
47
def self . base_name_for ( group )
Original file line number Diff line number Diff line change 179
179
} . to raise_error ( Exception )
180
180
end
181
181
end
182
+
183
+ class PredicateTest
184
+ def foo?
185
+ true
186
+ end
187
+
188
+ def bar?
189
+ false
190
+ end
191
+ end
192
+
193
+ describe "predicate matchers" do
194
+ it "works with positive expectations" do
195
+ expect ( PredicateTest . new ) . to be_foo
196
+ end
197
+
198
+ it "work with negative expectations" do
199
+ expect ( PredicateTest . new ) . to_not be_bar
200
+ end
201
+ end
You can’t perform that action at this time.
0 commit comments