testdo 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/features/testdo.feature +16 -1
- data/lib/testdo/version.rb +1 -1
- data/lib/testdo.rb +4 -2
- metadata +1 -1
data/features/testdo.feature
CHANGED
@@ -71,4 +71,19 @@ Feature: TestDO
|
|
71
71
|
["a", "b"] all?
|
72
72
|
OK: 0, failed: 1
|
73
73
|
|
74
|
-
"""
|
74
|
+
"""
|
75
|
+
|
76
|
+
Scenario:
|
77
|
+
Given a file named "file.rb" with:
|
78
|
+
"""
|
79
|
+
require 'testdo'
|
80
|
+
test do
|
81
|
+
%w[a b] == %w[a b]
|
82
|
+
end
|
83
|
+
"""
|
84
|
+
When I successfully run `ruby file.rb`
|
85
|
+
Then the output should contain exactly:
|
86
|
+
"""
|
87
|
+
OK: 1
|
88
|
+
|
89
|
+
"""
|
data/lib/testdo/version.rb
CHANGED
data/lib/testdo.rb
CHANGED
@@ -10,9 +10,11 @@ module Testdo
|
|
10
10
|
class Test
|
11
11
|
include Testdo
|
12
12
|
|
13
|
+
BASIC_EXPECTATIONS = %i[== === > < =~]
|
14
|
+
|
13
15
|
CAPTURE = {
|
14
|
-
[Fixnum, Range, String, NilClass, Regexp, TrueClass, FalseClass] =>
|
15
|
-
[Array] => %i[include? all? any? empty? one? none? member?] }
|
16
|
+
[Fixnum, Range, String, NilClass, Regexp, TrueClass, FalseClass] => BASIC_EXPECTATIONS,
|
17
|
+
[Array] => %i[include? all? any? empty? one? none? member?] + BASIC_EXPECTATIONS }
|
16
18
|
|
17
19
|
def initialize(capture: CAPTURE)
|
18
20
|
@capture = capture
|