rand-rspec 0.0.4 → 0.0.5

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: aee728c8432b16c2c12d719dab61b7114e0a22bc
4
- data.tar.gz: eea5fc928ebc40faedf70b000fa29666b35ada4e
3
+ metadata.gz: 1676e282ca7b06da7735bcd4bbc54c5c12d95466
4
+ data.tar.gz: e90306bbe2562cff84706c2b239747bf30cc9750
5
5
  SHA512:
6
- metadata.gz: bba1ffdf3461a3235e70b22b769e23e93867a8abd4e8239e38c7dd872bab04ade6cb3bc2db44a2148d244eedb5b519136184e21db104dd9d9331bafe91df94f7
7
- data.tar.gz: af283dbcf03a3bae34dacf8fc05fecf6ad6b622b1b3fa65927c3159511578df3d0d32436317dfa53044f9fe20b1e0d0b9b99379a03b35d844ae31d0e447ec221
6
+ metadata.gz: 73d5e83da434970810837de98d816f52c30fe239fdc8d6bf05826b97f597abd79879eca061b7488e9c280d66226efc1e3349504eb2511054b9fd218528cfc5d1
7
+ data.tar.gz: a7f16d9ffb58c9a21aa09a58b957800693a7c8cbd355a5b61f3da16c45797d9b46eefc44df506bd91bacaec11a381fab2ac1a9b776f2901a04214bcda57c8132
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Randtest
1
+ # Rand-Rspec
2
2
 
3
3
  TODO: Write a gem description
4
4
 
@@ -7,7 +7,7 @@ TODO: Write a gem description
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'randtest'
10
+ gem 'rand-rspec'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -16,7 +16,7 @@ And then execute:
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install randtest
19
+ $ gem install rand-rspec
20
20
 
21
21
  ## Usage
22
22
 
data/lib/rand-rspec.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "securerandom"
1
2
  require "rand-rspec/version"
2
3
  require "rand-rspec/integers"
3
4
  require "rand-rspec/strings"
@@ -4,8 +4,8 @@ module RandTest
4
4
  include Numbers
5
5
 
6
6
  def random_time
7
- epoch = random_number(Time.now.to_i)
8
- Time.at(epoch)
7
+ epoch = random_number(::Time.now.to_i)
8
+ ::Time.at(epoch)
9
9
  end
10
10
 
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Randtest
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'RandTest::Time' do
4
+ context "when having a default execution" do
5
+ it "generate a random between the begin and now" do
6
+ now = Time.now.to_i
7
+ expect(random_time.to_i).to be_within(now/2).of(now/2)
8
+ end
9
+ end
10
+ end
11
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rand-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pere Urbon-Bayes
@@ -78,6 +78,7 @@ files:
78
78
  - spec/lib/rand_numbers_spec.rb
79
79
  - spec/lib/rand_picks_spec.rb
80
80
  - spec/lib/rand_strings_spec.rb
81
+ - spec/lib/rand_timestamp_spec.rb
81
82
  - spec/spec_helper.rb
82
83
  homepage: https://github.com/purbon/rand-rspec
83
84
  licenses:
@@ -107,4 +108,5 @@ test_files:
107
108
  - spec/lib/rand_numbers_spec.rb
108
109
  - spec/lib/rand_picks_spec.rb
109
110
  - spec/lib/rand_strings_spec.rb
111
+ - spec/lib/rand_timestamp_spec.rb
110
112
  - spec/spec_helper.rb