orb 0.1.0 → 0.1.1
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/README.md +45 -0
- data/TODO +0 -1
- data/lib/orb/pry_extensions.rb +1 -1
- data/lib/orb/version.rb +1 -1
- metadata +6 -5
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Orb
|
2
|
+
|
3
|
+
Orb is a magical tool for interactively building tests.
|
4
|
+
|
5
|
+
The gist: You insert `orb!` into your test file, then run your tests.
|
6
|
+
When the runner gets to that line, it will open a REPL where you can
|
7
|
+
interact with the environment and build up a test to be written back to
|
8
|
+
the file.
|
9
|
+
|
10
|
+
Orb is still a work in progress. It does not currently actually write
|
11
|
+
back to the test file, but it will format a test to be pasted in.
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
The first step, after adding `gem "orb"` to your Gemfile, is to
|
16
|
+
insert `orb!` in the class body of a TestCase, then run your tests.
|
17
|
+
Once the repl appears, you will have access to the following
|
18
|
+
commands, in addition to the functionality of a typical IRB
|
19
|
+
(pry, really) prompt:
|
20
|
+
|
21
|
+
`,a`: Append the last line you ran in the REPL to the Buffer.
|
22
|
+
|
23
|
+
`,p`: Print the current contents of the Buffer.
|
24
|
+
|
25
|
+
`,e`: Edit the buffer in `ENV['EDITOR']`.
|
26
|
+
|
27
|
+
`,r`: Run the entire buffer again.
|
28
|
+
|
29
|
+
`,n`: Give a name to the current test. Called like `,n music is loud`.
|
30
|
+
|
31
|
+
`,w`: Print a version of the buffer suitable for pasting back into the
|
32
|
+
test file. Eventually this will modify the test file with the new test.
|
33
|
+
|
34
|
+
Within the context of the REPL, assertions are evaluated immediately,
|
35
|
+
rather than being deferred until later in the run. This lets you run
|
36
|
+
assertions at the REPL and get meaningful results. `nil` indicates
|
37
|
+
success; and error indicates and describes failure.
|
38
|
+
|
39
|
+
## Screencast
|
40
|
+
|
41
|
+
Coming soon!
|
42
|
+
|
43
|
+
## License
|
44
|
+
|
45
|
+
MIT
|
data/TODO
CHANGED
data/lib/orb/pry_extensions.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'pry'
|
2
2
|
|
3
|
-
Pry.config.prompt = proc { |_, _, pry| "orb[#{pry.instance_variable_get("@orb_test_buffer")}]> " }
|
3
|
+
Pry.config.prompt = proc { |_, _, pry| "orb[#{pry.instance_variable_get("@orb_test_buffer").length}]> " }
|
4
4
|
|
5
5
|
class Pry
|
6
6
|
attr_accessor :orb_test_buffer
|
data/lib/orb/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
16
|
-
requirement: &
|
16
|
+
requirement: &70284482119860 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.9.8.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70284482119860
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: test-unit
|
27
|
-
requirement: &
|
27
|
+
requirement: &70284482118880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70284482118880
|
36
36
|
description: REPL-driven testing for ruby -- integrates with pry and lets you build
|
37
37
|
tests incrementally in the REPL
|
38
38
|
email:
|
@@ -43,6 +43,7 @@ extra_rdoc_files: []
|
|
43
43
|
files:
|
44
44
|
- .gitignore
|
45
45
|
- Gemfile
|
46
|
+
- README.md
|
46
47
|
- Rakefile
|
47
48
|
- TODO
|
48
49
|
- lib/orb.rb
|