pidgin_spec 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/pidgin_spec.rb +32 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f08f4fd9023345ec1aadea869fb7c19c6f025331c833a9cd45bf6cb39e791360
|
4
|
+
data.tar.gz: 1c40b0e4330cadbdc5b32899400f3167c8c09e0d6a83f45357f93caca03176b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 61408984c3aee67823b5e4a33758b9db33cc1ae36869d12478b423d88911f909ea2cae4e2745da1adf848f3ea370a25ff44b221d99858c01fb7f4b3428467468
|
7
|
+
data.tar.gz: 51eb4ac1ce334c931500f0f8e3d0eec8f997edbe48c4f4d38f9e8a5994dc81c4b20cacf7da34858c6903b45bff50a88babfd749a4bb752c535f240f3f25d0384
|
data/lib/pidgin_spec.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
$LOAD_PATH << '.'
|
2
|
+
require "colorize"
|
3
|
+
require 'require_all'
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
require_all 'pidgin_spec'
|
8
|
+
|
9
|
+
class PidginSpec
|
10
|
+
def self.describe(desc = nil, &block)
|
11
|
+
puts desc
|
12
|
+
new(&block)
|
13
|
+
end
|
14
|
+
|
15
|
+
attr_accessor :fail_count, :pass_count, :failure_messages, :passed, :spec_count
|
16
|
+
def initialize(&block)
|
17
|
+
@pass_count = 0
|
18
|
+
@fail_count = 0
|
19
|
+
@spec_count = 0
|
20
|
+
@failure_messages = []
|
21
|
+
instance_eval(&block)
|
22
|
+
puts "\n#{@spec_count} tests run, #{@fail_count} fail#{"\n\nFailures:\n" if fail_count.nonzero?}".send(@fail_count.zero? ? 'green' : 'red')
|
23
|
+
@failure_messages.each_with_index {|m, index|
|
24
|
+
puts "#{index + 1}. #{m[:description]}"
|
25
|
+
puts m[:message].red
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
def describe(des_statement, &block)
|
30
|
+
ExampleGroup.new(des_statement, self, &block)
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pidgin_spec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ezenwa ogbonna
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple DSL for writing unit tests in Nigerian pidgin language. Pidgin
|
14
|
+
is a grammatically simplified form of communication in Nigeria and other West african
|
15
|
+
countries
|
16
|
+
email: ezenwaogbonna1@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/pidgin_spec.rb
|
22
|
+
homepage: https://rubygems.org/gems/pidgin_spec
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.7.9
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: Pidgin Spec!
|
46
|
+
test_files: []
|