fix 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31c51a42cf1817594ac8acded17fe569bca8fbc5
4
- data.tar.gz: 9e4fd8700a2c41a7420ed048b520fb802e485c34
3
+ metadata.gz: af4f77c8e0f75a3f88d2bdb4757cf1f7d122ed3e
4
+ data.tar.gz: f80e87cf83afcdcb0f731941769c6f7b95730887
5
5
  SHA512:
6
- metadata.gz: d95d05cc3ba74fb316d61df20fd2519b52c3a3b52f3c8025d9cfe96c12fd05b6ba120118ab1d9ef09becb878c09eb703b6d69bfca3a3d5d5650d013027dfd53c
7
- data.tar.gz: d1ee4975f7eac819051d464a83dfee7b617bf9cdd8bd6f26b68fb5210d0a7d4f34e16692e1f46402e4c98fc30181b8ec121986a82ddaed28abf1402c703936f3
6
+ metadata.gz: b75d2c1f34987e4bd05bf660ae656ba28cf9e09c4366c21a2a3dbff84e0852a3a8be7d6987451f8596bcfd3ddd73574492639d27bce1bb263780d2195a059b3f
7
+ data.tar.gz: ac75678ec541a7481ea4579d5cd0d34a3c0d112a6275021abfa42ab52622bac881ff41ec9f1970cac9066ce851583cd215a7ac6af0baa657809f53b094d4f096
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![Documentation](http://img.shields.io/:yard-docs-38c800.svg)](http://rubydoc.info/gems/fix/frames)
9
9
  [![License](http://img.shields.io/:license-MIT-38c800.svg)](http://cyril.mit-license.org/)
10
10
 
11
- > A specing framework for Ruby.
11
+ > Specing framework for Ruby.
12
12
 
13
13
  ## Contact
14
14
 
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby -w
2
2
 
3
3
  require_relative 'app'
4
- require 'fix'
4
+ require_relative File.join '..', '..', 'lib', 'fix', 'dsl'
5
5
 
6
6
  extend Fix::DSL
7
7
 
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
4
4
  spec.authors = ['Cyril Wack']
5
5
  spec.email = ['cyril@sashite.com']
6
6
  spec.summary = %q{Specing framework.}
7
- spec.description = %q{A specing framework for Ruby.}
7
+ spec.description = %q{Specing framework for Ruby.}
8
8
  spec.homepage = 'http://fixrb.org/'
9
9
  spec.license = 'MIT'
10
10
 
@@ -1,11 +1,15 @@
1
1
  require 'singleton'
2
2
 
3
3
  module Fix
4
- class DB < Hash
4
+ random = Random.new
5
+
6
+ db = Class.new Hash do
5
7
  include Singleton
6
8
 
7
- def random
8
- Random.new
9
+ define_method :random do
10
+ random
9
11
  end
10
12
  end
13
+
14
+ const_set :DB, db
11
15
  end
@@ -4,14 +4,14 @@ require_relative 'test'
4
4
 
5
5
  module Fix
6
6
  module DSL
7
- include Helper::ItsHelper
8
- include Helper::LetWriterHelper
9
- include Helper::OnHelper
10
-
11
7
  def subject object
8
+ include Helper::ItsHelper
9
+ include Helper::LetWriterHelper
10
+ include Helper::OnHelper
11
+
12
12
  @object = object
13
13
  end
14
14
 
15
- at_exit { Test.new }
15
+ at_exit { Test.new if $!.nil? or $!.kind_of?(SystemExit) }
16
16
  end
17
17
  end
@@ -18,9 +18,9 @@ module Fix
18
18
 
19
19
  private
20
20
 
21
- def pass? report, subject
21
+ def pass? result, subject
22
22
  if subject.implemented?
23
- report.exception.nil?
23
+ exception(result).nil?
24
24
  else
25
25
  true
26
26
  end
@@ -18,8 +18,8 @@ module Fix
18
18
 
19
19
  private
20
20
 
21
- def pass? report, _subject
22
- super || report.exception.nil?
21
+ def pass? result, _subject
22
+ super || exception(result).nil?
23
23
  end
24
24
 
25
25
  def level
@@ -18,4 +18,3 @@ module Fix
18
18
  end
19
19
 
20
20
  require_relative File.join '..', 'its'
21
- require_relative File.join '..', 'missing_subject_error'
@@ -17,5 +17,4 @@ module Fix
17
17
  end
18
18
  end
19
19
 
20
- require_relative File.join '..', 'missing_subject_error'
21
20
  require_relative File.join '..', 'on'
@@ -4,7 +4,7 @@ module Fix
4
4
  class Test
5
5
  attr_reader :total_time
6
6
 
7
- def initialize color: true, stdout: STDOUT, stderr: STDERR
7
+ def initialize color: true, stdout: $stdout, stderr: $stderr
8
8
  @options = { color: color, stdout: stdout, stderr: stderr }
9
9
 
10
10
  start_time = Time.now
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
@@ -30,7 +30,7 @@ cert_chain:
30
30
  sQCgS9KCAyZ+aWNO1bUJcE3Bx1XXkMO3JEyVR1CoEcexg5Ci03/lAm7lL84DmlKR
31
31
  3I7UWtomapPFbzC0J/5jzQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2014-09-26 00:00:00.000000000 Z
33
+ date: 2014-09-29 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: spectus
@@ -102,7 +102,7 @@ dependencies:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0.7'
105
- description: A specing framework for Ruby.
105
+ description: Specing framework for Ruby.
106
106
  email:
107
107
  - cyril@sashite.com
108
108
  executables: []
@@ -139,7 +139,6 @@ files:
139
139
  - lib/fix/helper/requirement_helper.rb
140
140
  - lib/fix/it.rb
141
141
  - lib/fix/its.rb
142
- - lib/fix/missing_subject_error.rb
143
142
  - lib/fix/on.rb
144
143
  - lib/fix/subject.rb
145
144
  - lib/fix/test.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,7 +0,0 @@
1
- module Fix
2
- # Missing subject error
3
- #
4
- # This is raised at the runtime when loading specs.
5
- class MissingSubjectError < ::StandardError
6
- end
7
- end