test_ish 0.0.1 → 0.0.2

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: 7be3af559de188c4c211532a9c728446b474decd
4
- data.tar.gz: 2d5510069be3b69e7a06f0ea6b08de226df5b233
3
+ metadata.gz: d9b181331c2c8d9505c5b87b1d45b05e65a23ee9
4
+ data.tar.gz: 9c14579aa8e51d951e48ca8b0ad87d0f99687f12
5
5
  SHA512:
6
- metadata.gz: a0108ceb5b02c97d962fddd4ebd274edca7b76f2895f2cada9f937d39060761c6993dbcca1dcd6dbd9be6c290a340068a8d1600703aea000828d544a29fe00e9
7
- data.tar.gz: ba03119269643fd2f54cebfbd881902f20c76a7396f8d1e92591ec7992568f7968fa922062262260ad709a5228c8b697eedadabbecd0ae4ebed1e2485aa66d27
6
+ metadata.gz: eb0c4926e3b22e52edd0fd4c8339c43c7c1b75a877f1431fb0b06edfb13b61c74a2c898df7a7930217de70673792503c9e00a7a40cf25017ae1cd896598c9268
7
+ data.tar.gz: dd6a792bd984b6c5753ef58f6d2e9d9291c56cc1e16b7d8f482f20dcd49904c8a8963f0e19b234e9a3939165350c365c7a72094a8601041faaf38336a94d61c1
data/README.md CHANGED
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- include TestIsh in your test setup or rspec config
21
+ require 'test_ish' gem in your tests in ruby code or your :test group in your Gemfile
22
22
 
23
23
  ## Contributing
24
24
 
@@ -1,36 +1,34 @@
1
1
  require "test_ish/version"
2
2
 
3
- module TestIsh
4
- class Numeric
5
- def ish(acceptable_delta=0.001)
6
- ApproximateValue.new self, acceptable_delta
7
- end
3
+ class Numeric
4
+ def ish(acceptable_delta=0.001)
5
+ ApproximateValue.new self, acceptable_delta
8
6
  end
9
- class ApproximateValue
10
- def initialize(me, acceptable_delta)
11
- @me = me
12
- @acceptable_delta = acceptable_delta
13
- end
14
-
15
- def ==(other)
16
- (other - @me).abs < @acceptable_delta
17
- end
18
-
19
- def to_s
20
- "within #{@acceptable_delta} of #{@me}"
21
- end
7
+ end
8
+ class ApproximateValue
9
+ def initialize(me, acceptable_delta)
10
+ @me = me
11
+ @acceptable_delta = acceptable_delta
12
+ end
13
+
14
+ def ==(other)
15
+ (other - @me).abs < @acceptable_delta
16
+ end
17
+
18
+ def to_s
19
+ "within #{@acceptable_delta} of #{@me}"
22
20
  end
21
+ end
23
22
 
24
- class Time
25
- def ish
26
- ApproxTime.new(self)
27
- end
23
+ class Time
24
+ def ish
25
+ ApproxTime.new(self)
28
26
  end
29
- class ApproxTime
30
- def initialize(t); @time = t; end
31
- def ==(o)
32
- return false if @time.nil? or o.nil?
33
- (@time - o).abs < 5
34
- end
27
+ end
28
+ class ApproxTime
29
+ def initialize(t); @time = t; end
30
+ def ==(o)
31
+ return false if @time.nil? or o.nil?
32
+ (@time - o).abs < 5
35
33
  end
36
34
  end
@@ -1,3 +1,3 @@
1
1
  module TestIsh
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_ish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Crosby