pretentious 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: 4eac89f08c915484d2749c73f703b6d8654f5e94
4
- data.tar.gz: abf3901c3235fa2ee6d266cbb5cd019f22e83c2a
3
+ metadata.gz: c540e7a1a93193e951dbd73f85dd6ef78f2657a9
4
+ data.tar.gz: 51818210e6346db9ac4c30f549ca586cefeeb40e
5
5
  SHA512:
6
- metadata.gz: a0f020ba8a6903e3bd55682c58e42a63c3ffddb3db7e99bada136aae4ecc2252a6ddd5a45ebe02f82e23f287aa8062f6a18b32d85a88c59af4558e782ac08d50
7
- data.tar.gz: 4c4c7d237a30ec08800be2d09fa363f6ced13a2cfaea11651c41508b1950e499f7077d759a194c76f2262bfb784825c2605b20254d146e7ed5e1792843330357
6
+ metadata.gz: e4812956f222bd0b479bc5721ad88dc66e1ab38f3f4879938824354f868010ba4b34bf8a261f1e23469ab2cd2534b9dd3df1b0bafdaf54310e25930205a2da2f
7
+ data.tar.gz: 2799fde8fdb2c36a929612ff94e642ae5986d83dd8fd77f76173b67dcb8c9513e2381daa5b2a45bdb568a7b4ef2754cefa567c9cda6b435f644076491683813c
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # Ruby::Pretentious
2
2
 
3
- Do you have a pretentious boss or dev lead that pushes you to embrace bdd/tdd but for reasons hate it or them?
4
- here is a gem to deal with that. Now you CAN write code first and then GENERATE tests later!! Yes you heard that
5
- right! This gem allows you to write your code first and then automatically generate tests using the code
6
- you've written!
3
+ Do you have a pretentious boss or development lead that pushes you to embrace BDD/TDD but for reasons hate it or them?
4
+ here is a gem to deal with that. Now you CAN write your code first and then GENERATE tests later!! Yes you heard that
5
+ right! To repeat, this gem allows you to write your code first and then automatically generate tests using the code
6
+ you've written in a straightfoward manner!
7
7
 
8
8
  On a serious note, this gem allows you to generate tests template much better than those generated by default
9
- for various frameworks.
9
+ for various frameworks. It is also useful for "recording" current behavior of existing components in order
10
+ to prepare for refactoring.
10
11
 
11
12
  ## Installation
12
13
 
@@ -46,8 +47,8 @@ class Fibonacci
46
47
  end
47
48
  ```
48
49
 
49
- Inside a Pretentious.spec_for(...) block. Just write boring code that calls the methods of your class like
50
- how you'd normally use them. Finally Specify the classes that you want to test:
50
+ Inside a Pretentious.spec_for(...) block. Just write boring code that instantiates an object as well as calls the methods
51
+ like how you'd normally use them. Finally Specify the classes that you want to test:
51
52
 
52
53
  ```ruby
53
54
  class Fibonacci
@@ -85,8 +86,8 @@ Save your file and then switch to the terminal to invoke:
85
86
 
86
87
  This will automatically generate rspec tests for Fibonacci under spec of the current working directory.
87
88
 
88
- you can invoke spec at this point, but the tests will fail. Instead you should edit spec/spec_helper.rb and
89
- put the necessary requires and definitions there.
89
+ You can actually invoke rspec at this point, but the tests will fail. Before you do that you should edit
90
+ spec/spec_helper.rb and put the necessary requires and definitions there.
90
91
 
91
92
  For this example place the following into spec_helper.rb:
92
93
 
@@ -138,16 +139,25 @@ RSpec.describe Digest::MD5 do
138
139
  end
139
140
  ```
140
141
 
141
- Only RSpec is support at this point. But other testing frameworks should be trivial to add support to.
142
+ Only RSpec is supported at this point. But other testing frameworks should be trivial to add support to.
143
+
144
+ ## Things to do after
145
+
146
+ Since your tests are already written, and hopefully nobody notices its written by a machine, you may just leave it
147
+ at that. Take note of the limitations though.
148
+
149
+ But if lest your conscience suffers, it is best to go back to the specs and refine them, add more tests and behave like
150
+ a bdd'er/tdd'er.
142
151
 
143
152
  ## Limitations
144
153
 
145
154
  Computers are bad at mind reading (for now) and they don't really know your expectation of "correctness", as such
146
155
  it assumes your code is correct and can only use equality based matchers. It can also only reliably match
147
- primitive data types and hashs and arrays to degree. More complex expectations are unfortunately left for the human to resolve.
156
+ primitive data types and hashs and arrays to a degree. More complex expectations are unfortunately left for the humans
157
+ to resolve.
148
158
 
149
159
  Also do note that it tries its best to determine how your fixtures are created, as well as the types
150
- of your parameters and does so by figuring out the components that your object needs. Failure can happen during this process.
160
+ of your parameters and does so by figuring out (recursively) the components that your object needs. Failure can happen during this process.
151
161
 
152
162
  Finally, Limit this gem for test environments only.
153
163
 
@@ -1,3 +1,3 @@
1
1
  module Pretentious
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -8,7 +8,7 @@ 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{Gem to deal with pretentious tdd developers}
11
+ spec.summary = %q{Generate tests from existing code as well as a way to deal with pretentious TDD/BDD developers}
12
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.}
13
13
  spec.homepage = "https://github.com/jedld/pretentious"
14
14
  spec.license = "MIT"
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.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Emmanuel Dayo
@@ -105,7 +105,8 @@ rubyforge_project:
105
105
  rubygems_version: 2.2.2
106
106
  signing_key:
107
107
  specification_version: 4
108
- summary: Gem to deal with pretentious tdd developers
108
+ summary: Generate tests from existing code as well as a way to deal with pretentious
109
+ TDD/BDD developers
109
110
  test_files:
110
111
  - spec/fibonacci_spec.rb
111
112
  - spec/m_d5_spec.rb