testrbl 0.8.0 → 0.9.0
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.
- checksums.yaml +5 -5
- data/Gemfile.lock +2 -2
- data/lib/testrbl.rb +4 -4
- data/lib/testrbl/version.rb +1 -1
- data/spec/testrbl_spec.rb +19 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 49534563e8d2c43647b84e457e1fd35873167eaa70b1687a63217d6005a11c5c
|
4
|
+
data.tar.gz: e5bc529fee2b1791547b4dc0f053c7138de70a9477b325d9fd2981eb8c040e40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1222308ab263f3098cdad5f0a99bf5abddecc6b61a7b5cb2a80066fefa1541ac88fbe1a722aa0e5182fea897df2ad6ad50a3afe20f91326a455de220e9fdb12
|
7
|
+
data.tar.gz: b5f502bcb6064306ffe14d6d9b58dd01a4e1f5c214720de65cec275047e1f60d8366c5beeb656bd71ecd172493a9924a3ae69e154340f1236d44aa147b5f31a3
|
data/Gemfile.lock
CHANGED
data/lib/testrbl.rb
CHANGED
@@ -2,9 +2,9 @@ require 'testrbl/version'
|
|
2
2
|
|
3
3
|
module Testrbl
|
4
4
|
PATTERNS = [
|
5
|
-
/^(\s+)(should|test|it)\s
|
6
|
-
/^(\s+)(context|describe)\s
|
7
|
-
/^(\s+)def\s+(test_)([a-z_\d]+)\s*(?:#.*)?$/
|
5
|
+
/^(\s+)(should|test|it)(\s+|\s*\(\s*)['"](.*)['"](\s*\))?\s+do\s*(?:#.*)?$/,
|
6
|
+
/^(\s+)(context|describe)(\s+|\s*\(\s*)['"]?(.*?)['"]?(\s*\))?\s+do\s*(?:#.*)?$/,
|
7
|
+
/^(\s+)def(\s+)(test_)([a-z_\d]+)\s*(?:#.*)?$/
|
8
8
|
]
|
9
9
|
|
10
10
|
OPTION_WITH_ARGUMENT = ["-I", "-r", "-n", "--name", "-e", "--exclude", "-s", "--seed"]
|
@@ -154,7 +154,7 @@ module Testrbl
|
|
154
154
|
def test_pattern_from_line(line)
|
155
155
|
PATTERNS.each do |r|
|
156
156
|
next unless line =~ r
|
157
|
-
whitespace, method, test_name = $1, $2, $
|
157
|
+
whitespace, method, test_name = $1, $2, $4
|
158
158
|
return [whitespace, test_pattern_from_match(method, test_name)]
|
159
159
|
end
|
160
160
|
nil
|
data/lib/testrbl/version.rb
CHANGED
data/spec/testrbl_spec.rb
CHANGED
@@ -346,6 +346,16 @@ describe Testrbl do
|
|
346
346
|
it "b./_-d" do
|
347
347
|
puts "-EFG-"
|
348
348
|
end
|
349
|
+
|
350
|
+
it("f-g") do
|
351
|
+
puts "-HIJ-"
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
355
|
+
describe("h-j") do
|
356
|
+
it "i-k" do
|
357
|
+
puts "-KLM-"
|
358
|
+
end
|
349
359
|
end
|
350
360
|
RUBY
|
351
361
|
end
|
@@ -370,6 +380,14 @@ describe Testrbl do
|
|
370
380
|
it "runs nested it" do
|
371
381
|
run_line("13").should == ["CDE"]
|
372
382
|
end
|
383
|
+
|
384
|
+
it "runs it with parens" do
|
385
|
+
run_line("28").should == ["HIJ"]
|
386
|
+
end
|
387
|
+
|
388
|
+
it "runs describe with parens" do
|
389
|
+
run_line("33").should == ["KLM"]
|
390
|
+
end
|
373
391
|
end
|
374
392
|
|
375
393
|
context "multiple files / folders" do
|
@@ -623,7 +641,7 @@ describe Testrbl do
|
|
623
641
|
call(" it \"xX ._-.. ___ Xx\" do\n").should == [" ", "#test_\\d+_xX \\._\\-\\.\\. ___ Xx$"]
|
624
642
|
end
|
625
643
|
|
626
|
-
it "finds with
|
644
|
+
it "finds with special characters" do
|
627
645
|
call(" it \"hmm? it's weird\\\"?\" do\n").should == [" ", "#test_\\d+_hmm\\? it.s weird\\\\\"\\?$"]
|
628
646
|
end
|
629
647
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testrbl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|
@@ -47,8 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
|
51
|
-
rubygems_version: 2.4.5.1
|
50
|
+
rubygems_version: 3.1.3
|
52
51
|
signing_key:
|
53
52
|
specification_version: 4
|
54
53
|
summary: Run ruby Test::Unit/Shoulda tests by line-number / folder / the dozen
|