grumpy_old_man 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Gemfile +4 -0
  2. data/Gemfile.lock +20 -0
  3. data/README.md +11 -5
  4. data/lib/grumpy_old_man.rb +3 -17
  5. metadata +6 -7
data/Gemfile CHANGED
@@ -3,3 +3,7 @@ source :rubygems
3
3
  group :test do
4
4
  gem "rspec"
5
5
  end
6
+
7
+ group :development do
8
+ gem "jekyll"
9
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,25 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ albino (1.3.3)
5
+ posix-spawn (>= 0.3.6)
6
+ classifier (1.3.3)
7
+ fast-stemmer (>= 1.0.0)
4
8
  diff-lcs (1.1.3)
9
+ directory_watcher (1.4.1)
10
+ fast-stemmer (1.0.1)
11
+ jekyll (0.11.2)
12
+ albino (~> 1.3)
13
+ classifier (~> 1.3)
14
+ directory_watcher (~> 1.1)
15
+ kramdown (~> 0.13)
16
+ liquid (~> 2.3)
17
+ maruku (~> 0.5)
18
+ kramdown (0.13.7)
19
+ liquid (2.4.1)
20
+ maruku (0.6.0)
21
+ syntax (>= 1.0.0)
22
+ posix-spawn (0.3.6)
5
23
  rspec (2.11.0)
6
24
  rspec-core (~> 2.11.0)
7
25
  rspec-expectations (~> 2.11.0)
@@ -10,9 +28,11 @@ GEM
10
28
  rspec-expectations (2.11.2)
11
29
  diff-lcs (~> 1.1.3)
12
30
  rspec-mocks (2.11.2)
31
+ syntax (1.0.0)
13
32
 
14
33
  PLATFORMS
15
34
  ruby
16
35
 
17
36
  DEPENDENCIES
37
+ jekyll
18
38
  rspec
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Asserts for RSpec
1
+ # Grumpy Old Man
2
2
 
3
- GrumpyOldMan is an RSpec shim that provides old school assert methods.
3
+ ## Adding old school asserts to RSpec.
4
4
 
5
- ![Grumpy Old Man GEM](http://hopsoft.github.com/grumpy_old_man/images/clint-eastwood.jpg)
5
+ ![GrumpyOldMan GEM](http://hopsoft.github.com/grumpy_old_man/images/clint-eastwood.jpg)
6
6
 
7
7
  It adds the following methods to RSpec without compromising any of RSpecs awesomeness.
8
8
 
@@ -17,9 +17,9 @@ Yes you really can have your cake and eat it too!
17
17
  I love several things about RSpec.
18
18
 
19
19
  * Its beautiful output from the test runner
20
- * Its declarative approach to writing tests... well at least the outer wrapper e.g. `describe Thing it 'should do stuff'`
20
+ * Its declarative approach to writing tests... well at least the outer wrapper e.g. `describe Thing; it 'should do stuff'`
21
21
 
22
- I lament the fact that the rest of RSpec is an over engineered solution to a simple problem.
22
+ I lament the fact that the rest of RSpec is an over engineered solution to a simple problem:
23
23
  `assert true`
24
24
 
25
25
  ---
@@ -46,9 +46,15 @@ Asserts allow me to write code that more closely resembles the app logic itself.
46
46
 
47
47
  ## Usage
48
48
 
49
+ ```bash
50
+ gem install grumpy_old_man
51
+ ```
52
+
49
53
  Simply include GrumpyOldMan in your spec/test like so.
50
54
 
51
55
  ```ruby
56
+ require 'grumpy_old_man'
57
+
52
58
  describe Thing
53
59
  include GrumpyOldMan
54
60
 
@@ -1,21 +1,7 @@
1
- # An RSpec shim that provides old school assert methods.
2
- # My contention is that its better to write tests in the same fashion that you write the app.
3
- # This approach is faster since it does away with the need to context switch
4
- # between app logic and a wonky DSL provided by the test suite.
5
- # The barrier to entry is also lower for the unitiated RSpec user.
6
- #
7
- # Consider the following example from the RSpec docs.
8
- # expect(order.total).to eq(Money.new(5.55, :USD))
9
- #
10
- # Rewritten with GrumpyOldMan.
11
- # assert_equal order.total, Money.new(5.55, :USD)
12
- #
13
- # The traditional assert allows me to write the same style of code in both the app and my tests.
14
- # This feels much more natural to me. You might not agree, but I'm sticking to my old fashioned assert.
1
+ # A mixin for RSpec tests that provides old school assert methods.
15
2
  module GrumpyOldMan
16
3
 
17
- # A simple assert for RSpec so folks don't have to learn a wonky DSL
18
- # and monkeypatched object methods that eventually boil down to a basic "assert" anyway.
4
+ # A simple assert for RSpec.
19
5
  #
20
6
  # @example
21
7
  # assert(true)
@@ -33,7 +19,7 @@ module GrumpyOldMan
33
19
  end
34
20
 
35
21
  # A basic assert helper that tests for Object equality.
36
- # Tests for object equivalence rather than object identity since this is sufficient for 99.9% of tests.
22
+ # Tests for object equivalence rather than object identity since this is sufficient for most tests.
37
23
  #
38
24
  # @param [Objecct] obj The Object to compare.
39
25
  # @param [Objecct] expected The expected value.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grumpy_old_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,10 +11,9 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-08-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! " Do you like RSpec's delcarative describe statements but hate its
15
- wonky DSL that monkey patches BasicObject?\n Do you want to write tests without
16
- learning all of RSpec's matchers and expectations?\n Do you prefer simple asserts
17
- in your test suite?\n Welcome home my friend, GrumpyOldMan is for you.\n"
14
+ description: ! ' Provides old school assert methods for your RSpec tests.
15
+
16
+ '
18
17
  email:
19
18
  - natehop@gmail.com
20
19
  executables: []
@@ -26,7 +25,7 @@ files:
26
25
  - Gemfile.lock
27
26
  - README.md
28
27
  - spec/grumpy_old_man_spec.rb
29
- homepage: https://github.com/hopsoft/grumpy_old_man
28
+ homepage: http://hopsoft.github.com/grumpy_old_man/
30
29
  licenses:
31
30
  - MIT
32
31
  post_install_message:
@@ -50,5 +49,5 @@ rubyforge_project:
50
49
  rubygems_version: 1.8.24
51
50
  signing_key:
52
51
  specification_version: 3
53
- summary: Asserts for RSpec.
52
+ summary: Asserts for RSpec
54
53
  test_files: []