mixed-in 0.0.1 → 0.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.
Files changed (3) hide show
  1. data/Rakefile +9 -0
  2. data/test/test-mixin.rb +20 -0
  3. metadata +3 -1
@@ -0,0 +1,9 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
9
+
@@ -0,0 +1,20 @@
1
+ require "test/unit"
2
+ require "mixin"
3
+
4
+ class MixinTest < Test::Unit::TestCase
5
+ module Foo
6
+ include Mixin
7
+ mixin do
8
+ def test
9
+ end
10
+ end
11
+ end
12
+
13
+ class A
14
+ include Foo
15
+ end
16
+
17
+ def test_mixins
18
+ assert_respond_to(A, :test, "A does not respond to test")
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixed-in
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -20,6 +20,8 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - lib/mixin.rb
23
+ - test/test-mixin.rb
24
+ - Rakefile
23
25
  homepage: http://rubygems.org/gems/mixed-in
24
26
  licenses:
25
27
  - MIT