i_love_unicode 0.0.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 +42 -0
- data/lib//342/234/223.rb +37 -0
- metadata +81 -0
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# ✓
|
2
|
+
|
3
|
+
✓ (pronounced *checkmark* or *“U+2713”*) is three things:
|
4
|
+
|
5
|
+
* Yet another Ruby test library because, you know, the world needs more Ruby testing libraries
|
6
|
+
* An experiment to test how deep the usual Ruby stack (Ruby itself, Rubygems, Bundler) and the related ecosystem (file systems, shells, editors, version control systems) embrace Unicode
|
7
|
+
* A stupid thing you could but probably should not try at home. No ☃s were damaged while doing it though
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
First, add it to your project, either the classic way:
|
12
|
+
|
13
|
+
$ gem install ✓
|
14
|
+
|
15
|
+
Or, much better, if you use Bundler, add it to your `Gemfile`:
|
16
|
+
|
17
|
+
gem '✓'
|
18
|
+
|
19
|
+
Then, create the directory to store your ✓ powered tests in it:
|
20
|
+
|
21
|
+
$ mkdir ✓
|
22
|
+
$ touch ✓/some_tests.✓
|
23
|
+
|
24
|
+
Test are written this way:
|
25
|
+
|
26
|
+
require '✓'
|
27
|
+
|
28
|
+
✓ do
|
29
|
+
✓ { 1 + 1 == 2 }
|
30
|
+
✓ { 'wadus'.upcase == 'WADUS' }
|
31
|
+
|
32
|
+
✗ { "something".nil? }
|
33
|
+
|
34
|
+
☐ { something_not_implemented_still }
|
35
|
+
end
|
36
|
+
|
37
|
+
And run in this not-very-surprising way:
|
38
|
+
|
39
|
+
$ rake ✓
|
40
|
+
|
41
|
+
[sample output]
|
42
|
+
|
data/lib//342/234/223.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'minitest/unit'
|
4
|
+
require 'minitest/autorun'
|
5
|
+
|
6
|
+
module Checkmark✓
|
7
|
+
module Toplevel
|
8
|
+
def ✓(&block)
|
9
|
+
Class.new(MiniTest::Unit::TestCase).class_eval do
|
10
|
+
instance_eval(&block)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
module Checks✓
|
16
|
+
def ✓(&block)
|
17
|
+
define_method "test_: #{rand.inspect}" do
|
18
|
+
assert instance_eval(&block)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def ✗(&block)
|
23
|
+
define_method "test_: #{rand.inspect}" do
|
24
|
+
assert !instance_eval(&block)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def ☐(&block)
|
29
|
+
define_method "test_: #{rand.inspect}" do
|
30
|
+
skip "☐ pending"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
include Checkmark✓::Toplevel
|
37
|
+
MiniTest::Unit::TestCase.extend Checkmark✓::Checks✓
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: i_love_unicode
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Sergio Gil
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-09-08 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: minitest-reporters
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
description:
|
35
|
+
email: sgilperez@gmail.com
|
36
|
+
executables: []
|
37
|
+
|
38
|
+
extensions: []
|
39
|
+
|
40
|
+
extra_rdoc_files:
|
41
|
+
- README.md
|
42
|
+
files:
|
43
|
+
- README.md
|
44
|
+
- "lib/\xE2\x9C\x93.rb"
|
45
|
+
homepage: "http://github.com/porras/\xE2\x9C\x93"
|
46
|
+
licenses: []
|
47
|
+
|
48
|
+
post_install_message:
|
49
|
+
rdoc_options:
|
50
|
+
- --main
|
51
|
+
- README.md
|
52
|
+
require_paths:
|
53
|
+
- lib
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
hash: 3
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
version: "0"
|
72
|
+
requirements: []
|
73
|
+
|
74
|
+
rubyforge_project:
|
75
|
+
rubygems_version: 1.8.24
|
76
|
+
signing_key:
|
77
|
+
specification_version: 3
|
78
|
+
summary: "\xE2\x9C\x93 Semantically awesome testing library"
|
79
|
+
test_files: []
|
80
|
+
|
81
|
+
has_rdoc:
|