rrr 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +2 -1
  2. data/spec/call_method_spec.rb +22 -0
  3. data/spec/cm_spec.rb +12 -9
  4. metadata +12 -1
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ AUTHOR = "maiha"
6
6
  EMAIL = "maiha@wota.jp"
7
7
  HOMEPAGE = "http://github.com/maiha/rrr"
8
8
  SUMMARY = "A ruby library for Ruby programming with RR that allows method overload"
9
- GEM_VERSION = "0.1.1"
9
+ GEM_VERSION = "0.1.2"
10
10
 
11
11
  spec = Gem::Specification.new do |s|
12
12
  s.rubyforge_project = 'asakusa'
@@ -21,6 +21,7 @@ spec = Gem::Specification.new do |s|
21
21
  s.email = EMAIL
22
22
  s.homepage = HOMEPAGE
23
23
  s.add_dependency('rr', '>= 0.10.4')
24
+ s.add_dependency('blankslate', '>= 2.1.2.3')
24
25
  s.require_path = 'lib'
25
26
  s.files = %w(MIT-LICENSE README Rakefile) + Dir.glob("{lib,spec,app,public,stubs}/**/*")
26
27
  end
@@ -0,0 +1,22 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ describe "RRR" do
4
+ before do
5
+ Object.send(:remove_const, 'Foo') rescue nil
6
+
7
+ class Foo
8
+ cm {
9
+ foo {'foo'}
10
+
11
+ upcase {ancestors}
12
+ downcase {foo}
13
+ }
14
+ end
15
+ end
16
+
17
+ describe "cm" do
18
+ it "can call defined methods" do
19
+ Foo.upcase.should == 'Foo'
20
+ end
21
+ end
22
+ end
@@ -1,16 +1,19 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper'
2
2
 
3
- class Foo
4
- cm {
5
- bar {'bar'}
6
-
7
- foo(1) {'foo1'}
8
- foo('x') {'foox'}
9
- }
10
- end
11
-
12
3
  describe "RRR" do
13
4
  describe "cm" do
5
+ before do
6
+ Object.send(:remove_const, 'Foo') rescue nil
7
+ class Foo
8
+ cm {
9
+ bar {'bar'}
10
+
11
+ foo(1) {'foo1'}
12
+ foo('x') {'foox'}
13
+ }
14
+ end
15
+ end
16
+
14
17
  context "when no arged method is defined" do
15
18
  it "adds class methods" do
16
19
  Foo.should respond_to(:bar)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - maiha
@@ -22,6 +22,16 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 0.10.4
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: blankslate
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.1.2.3
34
+ version:
25
35
  description: A ruby library for Ruby programming with RR that allows method overload
26
36
  email: maiha@wota.jp
27
37
  executables: []
@@ -36,6 +46,7 @@ files:
36
46
  - README
37
47
  - Rakefile
38
48
  - lib/rrr.rb
49
+ - spec/call_method_spec.rb
39
50
  - spec/im_spec.rb
40
51
  - spec/cm_spec.rb
41
52
  - spec/spec_helper.rb