pretentious 0.1.5 → 0.1.6

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: df840911bcf0942d55b16a3d9ea80370ad48eca6
4
- data.tar.gz: a284d31fb92dff010cb9b2a6459c26d34999caad
3
+ metadata.gz: 5f2d6ae04a184a2d01faa3d4b57870c670ed7a2d
4
+ data.tar.gz: e901c224433743d694beae8e5824dd79dbda0e12
5
5
  SHA512:
6
- metadata.gz: 50dce499f2f088060d5e402c5c17b77be27c7ff8a5c0c5eaba60d735a91ea82459638a17a4fa2a2b55668d3520ffeeba31b716e8a986e38fb8b248a3233c7236
7
- data.tar.gz: c94a2fffcb644a0ccc4c83a77e923ceb11f96c3fc01fa9ceedfe5a1d43c33f12590db719d5eaf96767249c4030165d2ec57fc709223c7b20d9162f0f4645b460
6
+ metadata.gz: f03e00d1f288a00205e8aa7318bf8abf90262ecd534d6ccf292d54014706147eb679a4a4859d4a339c8a877b08012b691dbc104728229d0f1472126abc7b0b00
7
+ data.tar.gz: 6be334899e32a59c1f5930ea885d40a7639c74623de6a19b63f017dc02838ae2130343288fcb3d372667fbf16c108fb367af5289a179095bca38f367653de7aa
data/example.rb CHANGED
@@ -3,18 +3,18 @@ $LOAD_PATH << '.'
3
3
  require 'digest/md5'
4
4
  require_relative './test_classes.rb'
5
5
 
6
+ [:spec_for, :minitest_for].each do |method|
7
+ Pretentious.send(method, Fibonacci) do
6
8
 
7
- Pretentious.spec_for(Fibonacci) do
9
+ instance = Fibonacci.new
8
10
 
11
+ (1..5).each do |n|
12
+ instance.fib(n)
13
+ end
9
14
 
10
- instance = Fibonacci.new
15
+ Fibonacci.say_hello
11
16
 
12
- (1..5).each do |n|
13
- instance.fib(n)
14
17
  end
15
-
16
- Fibonacci.say_hello
17
-
18
18
  end
19
19
 
20
20
  [:spec_for, :minitest_for].each do |method|
@@ -63,9 +63,11 @@ end
63
63
  end
64
64
  end
65
65
 
66
- Pretentious.spec_for(Digest::MD5) do
67
- sample = "This is the digest"
68
- Digest::MD5.hexdigest(sample)
66
+ [:spec_for, :minitest_for].each do |method|
67
+ Pretentious.send(method, Digest::MD5) do
68
+ sample = "This is the digest"
69
+ Digest::MD5.hexdigest(sample)
70
+ end
69
71
  end
70
72
 
71
73
  [:spec_for, :minitest_for].each do |m|
@@ -28,7 +28,7 @@ class Pretentious::MinitestGenerator < Pretentious::GeneratorBase
28
28
  buffer("require 'minitest_helper'")
29
29
  buffer('require "minitest/autorun"')
30
30
  whitespace
31
- buffer("class Test#{test_class.name} < Minitest::Test")
31
+ buffer("class #{test_class.name}Test < Minitest::Test")
32
32
  buffer("end")
33
33
  whitespace
34
34
  end
@@ -43,12 +43,16 @@ class Pretentious::MinitestGenerator < Pretentious::GeneratorBase
43
43
  def generate(test_instance, instance_count)
44
44
  global_variable_declaration = {}
45
45
  if (test_instance.is_a? Class)
46
+ buffer("class #{test_instance.test_class.name}Scenario#{instance_count} < #{@test_class.name}Test",0)
47
+
46
48
  #class methods
47
49
  class_method_calls = test_instance.method_calls_by_method
48
50
  buffer(generate_specs("#{test_instance.test_class.name}::",test_instance.test_class.name, class_method_calls, test_instance.let_variables,
49
51
  global_variable_declaration, {}))
52
+
53
+ buffer('end',0)
50
54
  else
51
- buffer("class #{test_instance.test_class.name}Scenario#{instance_count} < Test#{@test_class.name}",0)
55
+ buffer("class #{test_instance.test_class.name}Scenario#{instance_count} < #{@test_class.name}Test",0)
52
56
 
53
57
  buffer("def setup",1)
54
58
 
@@ -1,3 +1,3 @@
1
1
  module Pretentious
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/pretentious.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Pretentious::VERSION
9
9
  spec.authors = ["Joseph Emmanuel Dayo"]
10
10
  spec.email = ["joseph.dayo@gmail.com"]
11
- spec.summary = %q{Generate tests from existing code as well as a way to deal with pretentious TDD/BDD developers}
12
- spec.description = %q{Do you have a pretentious boss or dev lead that pushes you to embrace tdd but for reasons hate it or them? here is a gem to deal with that.}
11
+ spec.summary = %q{Characterization Tests generator for Ruby - Generate tests from existing/legacy code as well as a way to deal with pretentious TDD/BDD developers}
12
+ spec.description = %q{Characterization Tests for Ruby - Do you have a pretentious boss or dev lead that pushes you to embrace tdd but for reasons hate it or them? here is a gem to deal with that.}
13
13
  spec.homepage = "https://github.com/jedld/pretentious"
14
14
  spec.license = "MIT"
15
15
 
data/run_test.sh CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  git add .
4
4
  gem build pretentious.gemspec
5
- gem install pretentious-0.1.5.gem
5
+ gem install pretentious-0.1.6.gem
6
6
  ruby test/test_generator.rb
@@ -18,7 +18,7 @@ RSpec.describe Pretentious::Generator do
18
18
  result = Pretentious::Generator.generate_for(Fibonacci) do
19
19
  Fibonacci.say_hello
20
20
  end
21
- expect(result).to eq({Fibonacci =>{output: "#This file was automatically generated by the pretentious gem\nrequire 'minitest_helper'\nrequire \"minitest/autorun\"\n\nclass TestFibonacci < Minitest::Test\nend\n\n def test_current_expectation\n #Fibonacci::say_hello should return hello\n assert_equal \"hello\", Fibonacci.say_hello\n\n\n end\n\n",
21
+ expect(result).to eq({Fibonacci =>{output: "#This file was automatically generated by the pretentious gem\nrequire 'minitest_helper'\nrequire \"minitest/autorun\"\n\nclass FibonacciTest < Minitest::Test\nend\n\nclass FibonacciScenario1 < FibonacciTest\n def test_current_expectation\n #Fibonacci::say_hello should return hello\n assert_equal \"hello\", Fibonacci.say_hello\n\n\n end\n\nend\n",
22
22
  generator: Pretentious::MinitestGenerator }})
23
23
  end
24
24
 
@@ -26,12 +26,12 @@ RSpec.describe TestClass1 do
26
26
 
27
27
  it 'should pass current expectations' do
28
28
 
29
- var_2157293100 = Proc.new { |message|
29
+ var_2169524400 = Proc.new { |message|
30
30
  @message
31
31
  }
32
32
 
33
33
  test_class1 = nil
34
- var_2157279920 = Proc.new {
34
+ var_2169511140 = Proc.new {
35
35
  # Variable return values ... can't figure out what goes in here...
36
36
  }
37
37
 
@@ -42,11 +42,11 @@ RSpec.describe TestClass1 do
42
42
  # TestClass1#print_message should return
43
43
  expect( @fixture.print_message ).to be_nil
44
44
 
45
- # TestClass1#set_block should return #<Pretentious::RecordedProc:0x000001012af7e0@example.rb:73>
46
- expect( @fixture.set_block &var_2157293100 ).to eq(var_2157293100)
45
+ # TestClass1#set_block should return #<Pretentious::RecordedProc:0x00000102a00f98@example.rb:73>
46
+ expect( @fixture.set_block &var_2169524400 ).to eq(var_2169524400)
47
47
 
48
- # TestClass1#call_block should return {:hello=>"world", :test=>#<TestClass1:0x00000101305078 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2157453340=>"message"}>, :arr_1=>[1, 2, 3, 4, 5, #<TestClass1:0x00000101305078 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2157453340=>"message"}>], :sub_hash=>{:yes=>true, :obj=>#<TestClass1:0x00000101305078 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2157453340=>"message"}>}}
49
- expect( @fixture.call_block &var_2157279920 ).to eq(@message)
48
+ # TestClass1#call_block should return {:hello=>"world", :test=>#<TestClass1:0x00000101db0950 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2163049820=>"message"}>, :arr_1=>[1, 2, 3, 4, 5, #<TestClass1:0x00000101db0950 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2163049820=>"message"}>], :sub_hash=>{:yes=>true, :obj=>#<TestClass1:0x00000101db0950 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2163049820=>"message"}>}}
49
+ expect( @fixture.call_block &var_2169511140 ).to eq(@message)
50
50
 
51
51
  # TestClass1#something_is_wrong should return StandardError
52
52
  expect { @fixture.something_is_wrong }.to raise_error
@@ -67,7 +67,7 @@ RSpec.describe TestClass1 do
67
67
 
68
68
  another_object = TestClass1.new("test")
69
69
 
70
- # TestClass1#return_self when passed message = #<TestClass1:0x00000101305078> should return #<TestClass1:0x00000101305078>
70
+ # TestClass1#return_self when passed message = #<TestClass1:0x00000101db0950> should return #<TestClass1:0x00000101db0950>
71
71
  expect( @fixture.return_self(another_object) ).to eq(another_object)
72
72
 
73
73
  end
@@ -82,7 +82,7 @@ RSpec.describe TestClass1 do
82
82
 
83
83
  it 'should pass current expectations' do
84
84
 
85
- # TestClass1#message should return #<TestClass1:0x00000101305078>
85
+ # TestClass1#message should return #<TestClass1:0x00000101db0950>
86
86
  expect( @fixture.message ).to eq(@message)
87
87
 
88
88
  end
@@ -6,8 +6,8 @@ RSpec.describe TestClass3 do
6
6
  context 'Scenario 1' do
7
7
  before do
8
8
  another_object = TestClass1.new("test")
9
- var_2157439420 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
10
- testclass1 = TestClass1.new(var_2157439420)
9
+ var_2163035800 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
10
+ testclass1 = TestClass1.new(var_2163035800)
11
11
  testclass2 = TestClass2.new("This is message 2", nil)
12
12
  @fixture = TestClass3.new(testclass1, testclass2)
13
13
  end
@@ -24,8 +24,8 @@ RSpec.describe TestClass3 do
24
24
  context 'Scenario 2' do
25
25
  before do
26
26
  another_object = TestClass1.new("test")
27
- var_2157439420 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
28
- testclass1 = TestClass1.new(var_2157439420)
27
+ var_2163035800 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
28
+ testclass1 = TestClass1.new(var_2163035800)
29
29
  testclass2 = TestClass2.new("This is message 2", nil)
30
30
  @fixture = TestClass3.new(testclass1, testclass2)
31
31
  end
@@ -6,11 +6,11 @@ RSpec.describe TestClass4 do
6
6
  context 'Scenario 1' do
7
7
  before do
8
8
  var_8 = nil
9
- var_2157339500 = Proc.new {
9
+ var_2162919380 = Proc.new {
10
10
  # Variable return values ... can't figure out what goes in here...
11
11
  }
12
12
 
13
- @fixture = TestClass4.new(&var_2157339500)
13
+ @fixture = TestClass4.new(&var_2162919380)
14
14
  end
15
15
 
16
16
  it 'should pass current expectations' do
@@ -10,7 +10,7 @@ RSpec.describe TestClassForAutoStub do
10
10
 
11
11
  it 'should pass current expectations' do
12
12
 
13
- var_2172864580 = ["Hello Glorious world", "HI THERE!!!!"]
13
+ var_2162129300 = ["Hello Glorious world", "HI THERE!!!!"]
14
14
 
15
15
  allow_any_instance_of(ClassUsedByTestClass).to receive(:stubbed_method).and_return("Hello Glorious world")
16
16
  allow_any_instance_of(AnotherClassUsedByTestClass).to receive(:get_message).and_return("HI THERE!!!!")
@@ -10,7 +10,7 @@ RSpec.describe TestClassForMocks do
10
10
 
11
11
  it 'should pass current expectations' do
12
12
 
13
- var_2156244200 = [2, 3, 4, 5]
13
+ var_2169542660 = [2, 3, 4, 5]
14
14
 
15
15
  allow_any_instance_of(TestMockSubClass).to receive(:test_method).and_return("a return string")
16
16
  allow_any_instance_of(TestMockSubClass).to receive(:increment_val).and_return(2, 3, 4, 5)
@@ -38,12 +38,12 @@ RSpec.describe TestClassForMocks do
38
38
 
39
39
  it 'should pass current expectations' do
40
40
 
41
- var_2166356480 = {val: 1, str: "hello world", message: "a message"}
41
+ var_2169409740 = {val: 1, str: "hello world", message: "a message"}
42
42
 
43
- allow_any_instance_of(TestMockSubClass).to receive(:return_hash).and_return(var_2166356480)
43
+ allow_any_instance_of(TestMockSubClass).to receive(:return_hash).and_return(var_2169409740)
44
44
 
45
45
  # TestClassForMocks#method_with_usage3 when passed message = "a message" should return {:val=>1, :str=>"hello world", :message=>"a message"}
46
- expect( @fixture.method_with_usage3("a message") ).to eq(var_2166356480)
46
+ expect( @fixture.method_with_usage3("a message") ).to eq(var_2169409740)
47
47
 
48
48
  end
49
49
 
@@ -0,0 +1,47 @@
1
+ #This file was automatically generated by the pretentious gem
2
+ require 'minitest_helper'
3
+ require "minitest/autorun"
4
+
5
+ class FibonacciTest < Minitest::Test
6
+ end
7
+
8
+ class FibonacciScenario1 < FibonacciTest
9
+ def setup
10
+ @fixture = Fibonacci.new
11
+ end
12
+
13
+ def test_current_expectation
14
+ n = 1
15
+ n_1 = 2
16
+ n_2 = 3
17
+ n_3 = 4
18
+ n_4 = 5
19
+
20
+ #Fibonacci#fib when passed n = 1 should return 1
21
+ assert_equal 1, @fixture.fib(n)
22
+
23
+ #Fibonacci#fib when passed n = 2 should return 1
24
+ assert_equal 1, @fixture.fib(n_1)
25
+
26
+ #Fibonacci#fib when passed n = 3 should return 2
27
+ assert_equal 2, @fixture.fib(n_2)
28
+
29
+ #Fibonacci#fib when passed n = 4 should return 3
30
+ assert_equal 3, @fixture.fib(n_3)
31
+
32
+ #Fibonacci#fib when passed n = 5 should return 5
33
+ assert_equal 5, @fixture.fib(n_4)
34
+
35
+
36
+ end
37
+ end
38
+
39
+ class FibonacciScenario2 < FibonacciTest
40
+ def test_current_expectation
41
+ #Fibonacci::say_hello should return hello
42
+ assert_equal "hello", Fibonacci.say_hello
43
+
44
+
45
+ end
46
+
47
+ end
data/test/test_m_d5.rb ADDED
@@ -0,0 +1,18 @@
1
+ #This file was automatically generated by the pretentious gem
2
+ require 'minitest_helper'
3
+ require "minitest/autorun"
4
+
5
+ class Digest::MD5Test < Minitest::Test
6
+ end
7
+
8
+ class Digest::MD5Scenario1 < Digest::MD5Test
9
+ def test_current_expectation
10
+ sample = "This is the digest"
11
+
12
+ #Digest::MD5::hexdigest when passed "This is the digest" should return 9f12248dcddeda976611d192efaaf72a
13
+ assert_equal "9f12248dcddeda976611d192efaaf72a", Digest::MD5.hexdigest(sample)
14
+
15
+
16
+ end
17
+
18
+ end
data/test/test_meme.rb CHANGED
@@ -2,10 +2,10 @@
2
2
  require 'minitest_helper'
3
3
  require "minitest/autorun"
4
4
 
5
- class TestMeme < Minitest::Test
5
+ class MemeTest < Minitest::Test
6
6
  end
7
7
 
8
- class MemeScenario1 < TestMeme
8
+ class MemeScenario1 < MemeTest
9
9
  def setup
10
10
  @fixture = Meme.new
11
11
  end
@@ -2,10 +2,10 @@
2
2
  require 'minitest_helper'
3
3
  require "minitest/autorun"
4
4
 
5
- class TestTestClass1 < Minitest::Test
5
+ class TestClass1Test < Minitest::Test
6
6
  end
7
7
 
8
- class TestClass1Scenario1 < TestTestClass1
8
+ class TestClass1Scenario1 < TestClass1Test
9
9
  def setup
10
10
  @fixture = TestClass1.new("test")
11
11
  end
@@ -18,7 +18,7 @@ class TestClass1Scenario1 < TestTestClass1
18
18
  end
19
19
  end
20
20
 
21
- class TestClass1Scenario2 < TestTestClass1
21
+ class TestClass1Scenario2 < TestClass1Test
22
22
  def setup
23
23
  @another_object = TestClass1.new("test")
24
24
  @message = {hello: "world", test: @another_object, arr_1: [1, 2, 3, 4, 5, @another_object], sub_hash: {yes: true, obj: @another_object}}
@@ -26,12 +26,12 @@ class TestClass1Scenario2 < TestTestClass1
26
26
  end
27
27
 
28
28
  def test_current_expectation
29
- var_2162918140 = Proc.new { |message|
29
+ var_2169910980 = Proc.new { |message|
30
30
  @message
31
31
  }
32
32
 
33
33
  test_class1 = nil
34
- var_2162887340 = Proc.new {
34
+ var_2169892180 = Proc.new {
35
35
  # Variable return values ... can't figure out what goes in here...
36
36
  }
37
37
 
@@ -42,11 +42,11 @@ class TestClass1Scenario2 < TestTestClass1
42
42
  #TestClass1#print_message should return
43
43
  assert_nil @fixture.print_message
44
44
 
45
- #TestClass1#set_block should return #<Pretentious::RecordedProc:0x00000101d61990@example.rb:73>
46
- assert_equal var_2162918140, @fixture.set_block( &var_2162918140)
45
+ #TestClass1#set_block should return #<Pretentious::RecordedProc:0x00000102abde18@example.rb:73>
46
+ assert_equal var_2169910980, @fixture.set_block( &var_2169910980)
47
47
 
48
- #TestClass1#call_block should return {:hello=>"world", :test=>#<TestClass1:0x000001025011f0 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2166885020=>"message"}>, :arr_1=>[1, 2, 3, 4, 5, #<TestClass1:0x000001025011f0 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2166885020=>"message"}>], :sub_hash=>{:yes=>true, :obj=>#<TestClass1:0x000001025011f0 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2166885020=>"message"}>}}
49
- assert_equal @message, @fixture.call_block( &var_2162887340)
48
+ #TestClass1#call_block should return {:hello=>"world", :test=>#<TestClass1:0x000001022acee0 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2165663980=>"message"}>, :arr_1=>[1, 2, 3, 4, 5, #<TestClass1:0x000001022acee0 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2165663980=>"message"}>], :sub_hash=>{:yes=>true, :obj=>#<TestClass1:0x000001022acee0 @message="test", @_init_arguments={:params=>["test"], :params_types=>[[:req, :message]]}, @_variable_names={2165663980=>"message"}>}}
49
+ assert_equal @message, @fixture.call_block( &var_2169892180)
50
50
 
51
51
  #TestClass1#something_is_wrong should return StandardError
52
52
  assert_raises(StandardError) { @fixture.something_is_wrong }
@@ -58,7 +58,7 @@ class TestClass1Scenario2 < TestTestClass1
58
58
  end
59
59
  end
60
60
 
61
- class TestClass1Scenario3 < TestTestClass1
61
+ class TestClass1Scenario3 < TestClass1Test
62
62
  def setup
63
63
  @fixture = TestClass1.new("Hello")
64
64
  end
@@ -66,21 +66,21 @@ class TestClass1Scenario3 < TestTestClass1
66
66
  def test_current_expectation
67
67
  another_object = TestClass1.new("test")
68
68
 
69
- #TestClass1#return_self when passed message = #<TestClass1:0x000001025011f0> should return #<TestClass1:0x000001025011f0>
69
+ #TestClass1#return_self when passed message = #<TestClass1:0x000001022acee0> should return #<TestClass1:0x000001022acee0>
70
70
  assert_equal another_object, @fixture.return_self(another_object)
71
71
 
72
72
 
73
73
  end
74
74
  end
75
75
 
76
- class TestClass1Scenario4 < TestTestClass1
76
+ class TestClass1Scenario4 < TestClass1Test
77
77
  def setup
78
78
  @message = TestClass1.new("test")
79
79
  @fixture = TestClass1.new(@message)
80
80
  end
81
81
 
82
82
  def test_current_expectation
83
- #TestClass1#message should return #<TestClass1:0x000001025011f0>
83
+ #TestClass1#message should return #<TestClass1:0x000001022acee0>
84
84
  assert_equal @message, @fixture.message
85
85
 
86
86
 
@@ -2,10 +2,10 @@
2
2
  require 'minitest_helper'
3
3
  require "minitest/autorun"
4
4
 
5
- class TestTestClass2 < Minitest::Test
5
+ class TestClass2Test < Minitest::Test
6
6
  end
7
7
 
8
- class TestClass2Scenario1 < TestTestClass2
8
+ class TestClass2Scenario1 < TestClass2Test
9
9
  def setup
10
10
  @fixture = TestClass2.new("This is message 2", nil)
11
11
  end
@@ -21,7 +21,7 @@ class TestClass2Scenario1 < TestTestClass2
21
21
  end
22
22
  end
23
23
 
24
- class TestClass2Scenario2 < TestTestClass2
24
+ class TestClass2Scenario2 < TestClass2Test
25
25
  def setup
26
26
  @fixture = TestClass2.new("This is message 3", nil)
27
27
  end
@@ -31,7 +31,7 @@ class TestClass2Scenario2 < TestTestClass2
31
31
  end
32
32
  end
33
33
 
34
- class TestClass2Scenario3 < TestTestClass2
34
+ class TestClass2Scenario3 < TestClass2Test
35
35
  def setup
36
36
  @message2 = "This is message 3"
37
37
  message = TestClass2.new(@message2, nil)
@@ -2,14 +2,14 @@
2
2
  require 'minitest_helper'
3
3
  require "minitest/autorun"
4
4
 
5
- class TestTestClass3 < Minitest::Test
5
+ class TestClass3Test < Minitest::Test
6
6
  end
7
7
 
8
- class TestClass3Scenario1 < TestTestClass3
8
+ class TestClass3Scenario1 < TestClass3Test
9
9
  def setup
10
10
  another_object = TestClass1.new("test")
11
- var_2166831300 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
12
- testclass1 = TestClass1.new(var_2166831300)
11
+ var_2165630660 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
12
+ testclass1 = TestClass1.new(var_2165630660)
13
13
  testclass2 = TestClass2.new("This is message 2", nil)
14
14
  @fixture = TestClass3.new(testclass1, testclass2)
15
15
  end
@@ -22,11 +22,11 @@ class TestClass3Scenario1 < TestTestClass3
22
22
  end
23
23
  end
24
24
 
25
- class TestClass3Scenario2 < TestTestClass3
25
+ class TestClass3Scenario2 < TestClass3Test
26
26
  def setup
27
27
  another_object = TestClass1.new("test")
28
- var_2166831300 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
29
- testclass1 = TestClass1.new(var_2166831300)
28
+ var_2165630660 = {hello: "world", test: another_object, arr_1: [1, 2, 3, 4, 5, another_object], sub_hash: {yes: true, obj: another_object}}
29
+ testclass1 = TestClass1.new(var_2165630660)
30
30
  testclass2 = TestClass2.new("This is message 2", nil)
31
31
  @fixture = TestClass3.new(testclass1, testclass2)
32
32
  end
@@ -2,17 +2,17 @@
2
2
  require 'minitest_helper'
3
3
  require "minitest/autorun"
4
4
 
5
- class TestTestClass4 < Minitest::Test
5
+ class TestClass4Test < Minitest::Test
6
6
  end
7
7
 
8
- class TestClass4Scenario1 < TestTestClass4
8
+ class TestClass4Scenario1 < TestClass4Test
9
9
  def setup
10
10
  var_8 = nil
11
- var_2166614480 = Proc.new {
11
+ var_2169971280 = Proc.new {
12
12
  # Variable return values ... can't figure out what goes in here...
13
13
  }
14
14
 
15
- @fixture = TestClass4.new(&var_2166614480)
15
+ @fixture = TestClass4.new(&var_2169971280)
16
16
  end
17
17
 
18
18
  def test_current_expectation
@@ -2,16 +2,16 @@
2
2
  require 'minitest_helper'
3
3
  require "minitest/autorun"
4
4
 
5
- class TestTestClassForMocks < Minitest::Test
5
+ class TestClassForMocksTest < Minitest::Test
6
6
  end
7
7
 
8
- class TestClassForMocksScenario1 < TestTestClassForMocks
8
+ class TestClassForMocksScenario1 < TestClassForMocksTest
9
9
  def setup
10
10
  @fixture = TestClassForMocks.new
11
11
  end
12
12
 
13
13
  def test_current_expectation
14
- var_2166301840 = [2, 3, 4, 5]
14
+ var_2169291380 = [2, 3, 4, 5]
15
15
 
16
16
  TestMockSubClass.stub_any_instance(:test_method, "a return string") do
17
17
  TestMockSubClass.stub_any_instance(:increment_val, 2) do
@@ -33,17 +33,17 @@ class TestClassForMocksScenario1 < TestTestClassForMocks
33
33
  end
34
34
  end
35
35
 
36
- class TestClassForMocksScenario2 < TestTestClassForMocks
36
+ class TestClassForMocksScenario2 < TestClassForMocksTest
37
37
  def setup
38
38
  @fixture = TestClassForMocks.new
39
39
  end
40
40
 
41
41
  def test_current_expectation
42
- var_2166224460 = {val: 1, str: "hello world", message: "a message"}
42
+ var_2169019300 = {val: 1, str: "hello world", message: "a message"}
43
43
 
44
- TestMockSubClass.stub_any_instance(:return_hash, var_2166224460) do
44
+ TestMockSubClass.stub_any_instance(:return_hash, var_2169019300) do
45
45
  #TestClassForMocks#method_with_usage3 when passed message = "a message" should return {:val=>1, :str=>"hello world", :message=>"a message"}
46
- assert_equal var_2166224460, @fixture.method_with_usage3("a message")
46
+ assert_equal var_2169019300, @fixture.method_with_usage3("a message")
47
47
 
48
48
  end
49
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretentious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Emmanuel Dayo
@@ -108,8 +108,9 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: Do you have a pretentious boss or dev lead that pushes you to embrace
112
- tdd but for reasons hate it or them? here is a gem to deal with that.
111
+ description: Characterization Tests for Ruby - Do you have a pretentious boss or dev
112
+ lead that pushes you to embrace tdd but for reasons hate it or them? here is a gem
113
+ to deal with that.
113
114
  email:
114
115
  - joseph.dayo@gmail.com
115
116
  executables:
@@ -149,7 +150,9 @@ files:
149
150
  - spec/test_class_for_auto_stub_spec.rb
150
151
  - spec/test_class_for_mocks_spec.rb
151
152
  - test/minitest_helper.rb
153
+ - test/test_fibonacci.rb
152
154
  - test/test_generator.rb
155
+ - test/test_m_d5.rb
153
156
  - test/test_meme.rb
154
157
  - test/test_test_class1.rb
155
158
  - test/test_test_class2.rb
@@ -180,8 +183,8 @@ rubyforge_project:
180
183
  rubygems_version: 2.2.2
181
184
  signing_key:
182
185
  specification_version: 4
183
- summary: Generate tests from existing code as well as a way to deal with pretentious
184
- TDD/BDD developers
186
+ summary: Characterization Tests generator for Ruby - Generate tests from existing/legacy
187
+ code as well as a way to deal with pretentious TDD/BDD developers
185
188
  test_files:
186
189
  - spec/deconstructor_spec.rb
187
190
  - spec/fibonacci_spec.rb
@@ -197,7 +200,9 @@ test_files:
197
200
  - spec/test_class_for_auto_stub_spec.rb
198
201
  - spec/test_class_for_mocks_spec.rb
199
202
  - test/minitest_helper.rb
203
+ - test/test_fibonacci.rb
200
204
  - test/test_generator.rb
205
+ - test/test_m_d5.rb
201
206
  - test/test_meme.rb
202
207
  - test/test_test_class1.rb
203
208
  - test/test_test_class2.rb