completecrap 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.0.2 / 2009-11-07
2
+
3
+ * Now, when CompleteCrap is included, HAHA is set
4
+
1
5
  === 1.0.1 / 2009-11-07
2
6
 
3
7
  * Changed module name from Completecrap to CompleteCrap
data/lib/completecrap.rb CHANGED
@@ -1,3 +1,7 @@
1
- class CompleteCrap
2
- VERSION = '1.0.1'
1
+ module CompleteCrap
2
+ VERSION = '1.0.2'
3
+
4
+ def self.included klass
5
+ const_set :HAHA,"GOT YOU" unless defined?(HAHA)
6
+ end
3
7
  end
@@ -1,8 +1,17 @@
1
1
  require "test/unit"
2
2
  require "completecrap"
3
3
 
4
- class TestCompletecrap < Test::Unit::TestCase
5
- def test_sanity
6
- CompleteCrap
4
+ class TestBeforeIncludeCompleteCrap < Test::Unit::TestCase
5
+ def test_before_include
6
+ assert !defined?(HAHA)
7
+ end
8
+ end
9
+
10
+ class TestAfterIncludeCompleteCrap
11
+
12
+ include CompleteCrap
13
+
14
+ def test_after_include
15
+ assert defined?(HAHA)
7
16
  end
8
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completecrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Van Dyk