meszaros 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/meszaros.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "meszaros/version"
2
+ require 'meszaros/loop'
2
3
 
3
4
  module Meszaros
4
5
  # Your code goes here...
@@ -1,3 +1,3 @@
1
1
  module Meszaros
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -4,33 +4,33 @@ require 'meszaros/loop'
4
4
  module Meszaros
5
5
  describe Loop do
6
6
  it "should allow data driven spec : 0" do
7
- x = []
7
+ result = []
8
8
  Loop.data_driven_spec([]) do |element|
9
- x << element
9
+ result << element
10
10
  end
11
11
 
12
- x.should == []
12
+ result.should be_empty
13
13
  end
14
14
 
15
15
  it "should allow data driven spec : 1" do
16
- x = []
16
+ result = []
17
17
  Loop.data_driven_spec([4]) do |element|
18
- x << element
18
+ result << element
19
19
  end
20
20
 
21
- x.should == [4]
21
+ result.should == [4]
22
22
  end
23
23
 
24
24
  it "should allow data driven spec : n" do
25
- x = []
25
+ result = []
26
26
  Loop.data_driven_spec([1,2,3,4]) do |element|
27
- x << element
27
+ result << element
28
28
  end
29
29
 
30
- x.should == [1,2,3,4]
30
+ result.should == [1,2,3,4]
31
31
  end
32
32
 
33
- it "should raise exception when nil is passed as the parameter to data driven spec" do
33
+ it "should raise eresultception when nil is passed as the parameter to data driven spec" do
34
34
  expect do
35
35
  Loop.data_driven_spec(nil) do |element|
36
36
  true.should be_true
@@ -39,27 +39,27 @@ module Meszaros
39
39
 
40
40
  end
41
41
 
42
- it "should allow execution of a chunk of code for 0 number of times" do
43
- x = 0
42
+ it "should allow eresultecution of a chunk of code for 0 number of times" do
43
+ result = 0
44
44
 
45
45
  Loop.repeat(0) do
46
- x += 1
46
+ result += 1
47
47
  end
48
48
 
49
- x.should == 0
49
+ result.should == 0
50
50
  end
51
51
 
52
- it "should allow execution of a chunk of code for 1 number of times" do
53
- x = 0
52
+ it "should allow eresultecution of a chunk of code for 1 number of times" do
53
+ result = 0
54
54
 
55
55
  Loop.repeat(1) do
56
- x += 1
56
+ result += 1
57
57
  end
58
58
 
59
- x.should == 1
59
+ result.should == 1
60
60
  end
61
61
 
62
- it "should raise exception when nil is passed for the parameter to repeat" do
62
+ it "should raise eresultception when nil is passed for the parameter to repeat" do
63
63
  expect do
64
64
  Loop.repeat(nil) do
65
65
  true.should be_true
@@ -68,7 +68,7 @@ module Meszaros
68
68
 
69
69
  end
70
70
 
71
- it "should raise exception when string is passed for the parameter to repeat" do
71
+ it "should raise eresultception when string is passed for the parameter to repeat" do
72
72
  expect do
73
73
  Loop.repeat("dumb") do
74
74
  true.should be_true
@@ -76,7 +76,7 @@ module Meszaros
76
76
  end.to raise_error
77
77
  end
78
78
 
79
- it "should raise exception when float is passed for the parameter to repeat" do
79
+ it "should raise eresultception when float is passed for the parameter to repeat" do
80
80
  expect do
81
81
  Loop.repeat(2.2) do
82
82
  true.should be_true
@@ -84,14 +84,14 @@ module Meszaros
84
84
  end.to raise_error
85
85
  end
86
86
 
87
- it "should allow execution of a chunk of code for n number of times" do
88
- x = 0
87
+ it "should allow eresultecution of a chunk of code for n number of times" do
88
+ result = 0
89
89
 
90
90
  Loop.repeat(3) do
91
- x += 1
91
+ result += 1
92
92
  end
93
93
 
94
- x.should == 3
94
+ result.should == 3
95
95
  end
96
96
  end
97
97
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: meszaros
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bala Paranj