abstract_type 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b472b350e9d1625b85c7f140ac7c6ca5ee1385c3
4
+ data.tar.gz: 7f516b28d1f181eac0968d75539768c47e7751c6
5
+ SHA512:
6
+ metadata.gz: 3b9888a8c4bedaf52b65a84ce85f3b085699370601a70eefad3cd3e008be8da91a4fdf297a4291ce7ad0667a91d692033510560e3dd4eae9251dee2cbc394ff6
7
+ data.tar.gz: 64603b2cd5ea626c7afaa38343592678ab3669e9dbabb406830be174778c92570d9454acc87031923e7416781ae6b46b2445e2d74bc0a44018b84d6312032666
@@ -0,0 +1 @@
1
+ abstract_type
@@ -3,19 +3,28 @@ before_install: gem install bundler
3
3
  bundler_args: --without yard guard metrics benchmarks
4
4
  script: "bundle exec rake ci"
5
5
  rvm:
6
- - ree
7
- - 1.8.7
8
6
  - 1.9.2
9
7
  - 1.9.3
10
8
  - 2.0.0
11
- - ruby-head
12
- - jruby-18mode
13
- - jruby-19mode
14
- - jruby-head
15
- - rbx-18mode
16
9
  - rbx-19mode
10
+ - jruby-19mode
11
+ - ruby-head
17
12
  notifications:
18
- irc: "irc.freenode.org#datamapper"
13
+ irc:
14
+ channels:
15
+ - irc.freenode.org#rom-rb
16
+ on_success: never
17
+ on_failure: change
19
18
  email:
20
- - dan.kubb@gmail.com
21
- - mbj@seonic.net
19
+ recipients:
20
+ - dan.kubb@gmail.com
21
+ on_success: never
22
+ on_failure: change
23
+ matrix:
24
+ allow_failures:
25
+ - rvm: ruby-head
26
+ include:
27
+ - rvm: jruby-19mode
28
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
29
+ - rvm: jruby-head
30
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
@@ -0,0 +1,11 @@
1
+ Contributing
2
+ ------------
3
+
4
+ * If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and the direction it is going may not always be clear. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin.
5
+ * Fork the project.
6
+ * Make your feature addition or bug fix.
7
+ * Follow this [style guide](https://github.com/dkubb/styleguide).
8
+ * Add specs for it. This is important so I don't break it in a future version unintentionally. Tests must cover all branches within the code, and code must be fully covered.
9
+ * Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
10
+ * Run "rake ci". This must pass and not show any regressions in the metrics for the code to be merged.
11
+ * Send me a pull request. Bonus points for topic branches.
data/Gemfile CHANGED
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'devtools', :git => 'https://github.com/datamapper/devtools.git'
7
+ gem 'devtools', :git => 'https://github.com/rom-rb/devtools.git'
8
8
  eval File.read('Gemfile.devtools')
@@ -1,27 +1,26 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  group :development do
4
- gem 'rake', '~> 10.0.3'
4
+ gem 'rake', '~> 10.1.0'
5
5
  gem 'rspec', '~> 2.13.0'
6
- gem 'yard', '~> 0.8.5'
6
+ gem 'yard', '~> 0.8.6.1'
7
7
  end
8
8
 
9
9
  group :yard do
10
- gem 'kramdown', '~> 0.14.2'
10
+ gem 'kramdown', '~> 1.0.1'
11
11
  end
12
12
 
13
13
  group :guard do
14
- gem 'guard', '~> 1.6.2'
14
+ gem 'guard', '~> 1.8.1'
15
15
  gem 'guard-bundler', '~> 1.0.0'
16
- gem 'guard-rspec', '~> 2.4.1'
16
+ gem 'guard-rspec', '~> 3.0.2'
17
17
 
18
18
  # file system change event handling
19
+ gem 'listen', '~> 1.2.2'
19
20
  gem 'rb-fchange', '~> 0.0.6', :require => false
20
21
  gem 'rb-fsevent', '~> 0.9.3', :require => false
21
22
  gem 'rb-inotify', '~> 0.9.0', :require => false
22
23
 
23
- gem 'listen', '~> 0.7.3'
24
-
25
24
  # notification handling
26
25
  gem 'libnotify', '~> 0.8.0', :require => false
27
26
  gem 'rb-notifu', '~> 0.0.4', :require => false
@@ -29,23 +28,19 @@ group :guard do
29
28
  end
30
29
 
31
30
  group :metrics do
32
- gem 'flay', '~> 2.1.0'
33
- gem 'flog', '~> 3.2.2'
34
- gem 'reek', '~> 1.3.1'
35
- gem 'metric_fu-roodi', '~> 2.2.1'
36
- gem 'yardstick', '~> 0.9.3', :git => 'https://github.com/dkubb/yardstick.git'
37
-
38
- platforms :ruby_18, :ruby_19 do
39
- # this indirectly depends on ffi which does not build on ruby-head
31
+ gem 'coveralls', '~> 0.6.7'
32
+ gem 'flay', '~> 2.3.0'
33
+ gem 'flog', '~> 4.1.0'
34
+ gem 'reek', '~> 1.3.1', :git => 'https://github.com/troessner/reek.git'
35
+ gem 'simplecov', '~> 0.7.1'
36
+ gem 'yardstick', '~> 0.9.6'
37
+
38
+ platforms :ruby_19 do
40
39
  gem 'yard-spellcheck', '~> 0.1.5'
41
40
  end
42
41
 
43
- platforms :mri_19, :rbx do
44
- gem 'mutant', '~> 0.2.17'
45
- end
46
-
47
- platforms :mri_19 do
48
- gem 'simplecov', '~> 0.7.1'
42
+ platforms :ruby_19, :ruby_20 do
43
+ gem 'mutant', '~> 0.3.0.beta6'
49
44
  end
50
45
 
51
46
  platforms :rbx do
@@ -59,6 +54,6 @@ end
59
54
 
60
55
  platform :jruby do
61
56
  group :jruby do
62
- gem 'jruby-openssl', '~> 0.8.2'
57
+ gem 'jruby-openssl', '~> 0.8.5'
63
58
  end
64
59
  end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2012 Dan Kubb
1
+ Copyright (c) 2009-2013 Dan Kubb
2
2
  Copyright (c) 2012 Markus Schirp
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
data/README.md CHANGED
@@ -1,11 +1,19 @@
1
1
  abstract_type
2
2
  ==============
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/dkubb/abstract_type.png?branch=master)](http://travis-ci.org/dkubb/abstract_type)
5
- [![Dependency Status](https://gemnasium.com/dkubb/abstract_type.png)](https://gemnasium.com/dkubb/abstract_type)
6
- [![Code Climate](https://codeclimate.com/github/dkubb/abstract_type.png)](https://codeclimate.com/github/dkubb/abstract_type)
7
-
8
- This is a small standalone gem featuring a module ripped out from [veritas](https://github.com/dkubb/veritas).
4
+ [![Gem Version](https://badge.fury.io/rb/abstract_type.png)][gem]
5
+ [![Build Status](https://secure.travis-ci.org/dkubb/abstract_type.png?branch=master)][travis]
6
+ [![Dependency Status](https://gemnasium.com/dkubb/abstract_type.png)][gemnasium]
7
+ [![Code Climate](https://codeclimate.com/github/dkubb/abstract_type.png)][codeclimate]
8
+ [![Coverage Status](https://coveralls.io/repos/dkubb/abstract_type/badge.png?branch=master)][coveralls]
9
+
10
+ [gem]: https://rubygems.org/gems/abstract_type
11
+ [travis]: https://travis-ci.org/dkubb/abstract_type
12
+ [gemnasium]: https://gemnasium.com/dkubb/abstract_type
13
+ [codeclimate]: https://codeclimate.com/github/dkubb/abstract_type
14
+ [coveralls]: https://coveralls.io/r/dkubb/abstract_type
15
+
16
+ This is a small standalone gem featuring a module ripped out from [axiom](https://github.com/dkubb/axiom).
9
17
  It allows to declare abstract_type classes and modules in an unobstrusive way.
10
18
 
11
19
  Installation
@@ -63,37 +71,11 @@ Credits
63
71
  * Markus Schirp ([mbj](https://github.com/mbj))
64
72
 
65
73
  Contributing
66
- -------------
67
-
68
- * If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and the direction it is going may not always be clear. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin.
69
- * Fork the project.
70
- * Make your feature addition or bug fix.
71
- * Follow this [style guide](https://github.com/dkubb/styleguide).
72
- * Add specs for it. This is important so I don't break it in a future version unintentionally. Tests must cover all branches within the code, and code must be fully covered.
73
- * Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
74
- * Run "rake ci". This must pass and not show any regressions in the metrics for the code to be merged.
75
- * Send me a pull request. Bonus points for topic branc
76
-
77
- License
78
- -------
74
+ ------------
75
+
76
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
77
+
78
+ Copyright
79
+ ---------
79
80
 
80
- Copyright (c) 2001-2012 Dan Kubb
81
-
82
- Permission is hereby granted, free of charge, to any person obtaining
83
- a copy of this software and associated documentation files (the
84
- "Software"), to deal in the Software without restriction, including
85
- without limitation the rights to use, copy, modify, merge, publish,
86
- distribute, sublicense, and/or sell copies of the Software, and to
87
- permit persons to whom the Software is furnished to do so, subject to
88
- the following conditions:
89
-
90
- The above copyright notice and this permission notice shall be
91
- included in all copies or substantial portions of the Software.
92
-
93
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
94
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
95
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
96
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
97
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
98
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
99
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
81
+ Copyright © 2009-2013 Dan Kubb. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'rake'
4
3
  require 'devtools'
5
4
 
6
- Devtools.init
5
+ Devtools.init_rake_tasks
@@ -15,9 +15,5 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = `git ls-files -- spec/unit`.split($/)
16
16
  gem.extra_rdoc_files = %w[LICENSE README.md TODO]
17
17
 
18
- gem.add_runtime_dependency('backports', [ '~> 3.0', '>= 3.0.3' ])
19
-
20
- gem.add_development_dependency('rake', '~> 10.0.3')
21
- gem.add_development_dependency('rspec', '~> 2.12.0')
22
- gem.add_development_dependency('yard', '~> 0.8.5')
18
+ gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')
23
19
  end
@@ -1,3 +1,3 @@
1
1
  ---
2
- threshold: 13
3
- total_score: 31
2
+ threshold: 9
3
+ total_score: 17
@@ -1,2 +1,2 @@
1
1
  ---
2
- threshold: 19.8
2
+ threshold: 9.0
@@ -7,7 +7,7 @@ UncommunicativeParameterName:
7
7
  - !ruby/regexp /^.$/
8
8
  - !ruby/regexp /[0-9]$/
9
9
  - !ruby/regexp /[A-Z]/
10
- LargeClass:
10
+ TooManyMethods:
11
11
  max_methods: 10
12
12
  exclude: []
13
13
  enabled: true
@@ -51,11 +51,11 @@ NestedIterators:
51
51
  ]
52
52
  enabled: true
53
53
  max_allowed_nesting: 1
54
- LongMethod:
54
+ TooManyStatements:
55
55
  max_statements: 7 # TODO: decrease max_statements to 5 or less
56
56
  exclude: []
57
57
  enabled: true
58
- Duplication:
58
+ DuplicateMethodCall:
59
59
  allow_calls: []
60
60
  exclude: []
61
61
  enabled: true
@@ -75,7 +75,7 @@ UncommunicativeVariableName:
75
75
  - !ruby/regexp /^.$/
76
76
  - !ruby/regexp /[0-9]$/
77
77
  - !ruby/regexp /[A-Z]/
78
- SimulatedPolymorphism:
78
+ RepeatedConditional:
79
79
  exclude: []
80
80
  enabled: true
81
81
  max_ifs: 1
@@ -84,7 +84,7 @@ DataClump:
84
84
  enabled: true
85
85
  max_copies: 1
86
86
  min_clump_size: 3
87
- ControlCouple:
87
+ ControlParameter:
88
88
  exclude: []
89
89
  enabled: true
90
90
  LongYieldList:
@@ -1,7 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'backports'
4
-
5
3
  # Module to allow class and methods to be abstract
6
4
  module AbstractType
7
5
 
@@ -92,10 +90,8 @@ module AbstractType
92
90
  #
93
91
  # @api private
94
92
  def create_abstract_singleton_method(name)
95
- singleton_class.class_eval do
96
- define_method(name) do |*|
97
- raise NotImplementedError, "#{inspect}.#{name} is not implemented"
98
- end
93
+ define_singleton_method(name) do |*|
94
+ raise NotImplementedError, "#{inspect}.#{name} is not implemented"
99
95
  end
100
96
  end
101
97
 
@@ -3,6 +3,6 @@
3
3
  module AbstractType
4
4
 
5
5
  # Gem version
6
- VERSION = '0.0.5'.freeze
6
+ VERSION = '0.0.6'.freeze
7
7
 
8
8
  end # module AbstractType
@@ -1,24 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- if ENV['COVERAGE'] == 'true'
4
- require 'simplecov'
5
-
6
- SimpleCov.start do
7
- command_name 'spec:unit'
8
- add_filter 'config'
9
- add_filter 'spec'
10
- minimum_coverage 100
11
- end
12
- end
13
-
14
3
  require 'abstract_type'
15
- require 'rspec'
16
- require 'rspec/autorun' if RUBY_VERSION < '1.9'
17
-
18
- # require spec support files and shared behavior
19
- Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each do |file|
20
- require file
21
- end
4
+ require 'devtools/spec_helper'
22
5
 
23
6
  RSpec.configure do |config|
24
7
  end
@@ -3,19 +3,47 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe AbstractType::ClassMethods, '#new' do
6
- subject { object.new }
6
+ context 'with arguments' do
7
+ subject { object.new(:foo) }
7
8
 
8
- let(:abstract_type) { Class.new { include AbstractType } }
9
+ let(:abstract_type) do
10
+ Class.new do
11
+ include AbstractType
9
12
 
10
- context 'called on a subclass' do
11
- let(:object) { Class.new(abstract_type) }
13
+ def initialize(foo)
14
+ @foo = foo
15
+ end
16
+ end
17
+ end
12
18
 
13
- it { should be_instance_of(object) }
19
+ context 'called on a subclass' do
20
+ let(:object) { Class.new(abstract_type) }
21
+
22
+ it { should be_instance_of(object) }
23
+ end
24
+
25
+ context 'called on the class' do
26
+ let(:object) { abstract_type }
27
+
28
+ specify { expect { subject }.to raise_error(NotImplementedError, "#{object} is an abstract type") }
29
+ end
14
30
  end
15
31
 
16
- context 'called on the class' do
17
- let(:object) { abstract_type }
32
+ context 'without arguments' do
33
+ subject { object.new }
34
+
35
+ let(:abstract_type) { Class.new { include AbstractType } }
36
+
37
+ context 'called on a subclass' do
38
+ let(:object) { Class.new(abstract_type) }
39
+
40
+ it { should be_instance_of(object) }
41
+ end
42
+
43
+ context 'called on the class' do
44
+ let(:object) { abstract_type }
18
45
 
19
- specify { expect { subject }.to raise_error(NotImplementedError, "#{object} is an abstract type") }
46
+ specify { expect { subject }.to raise_error(NotImplementedError, "#{object} is an abstract type") }
47
+ end
20
48
  end
21
49
  end
metadata CHANGED
@@ -1,86 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstract_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
- prerelease:
4
+ version: 0.0.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dan Kubb
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-01 00:00:00.000000000 Z
11
+ date: 2013-07-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: backports
14
+ name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '3.0'
22
- - - ! '>='
19
+ version: '1.3'
20
+ - - '>='
23
21
  - !ruby/object:Gem::Version
24
- version: 3.0.3
25
- type: :runtime
26
- prerelease: false
27
- version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: '3.0'
33
- - - ! '>='
34
- - !ruby/object:Gem::Version
35
- version: 3.0.3
36
- - !ruby/object:Gem::Dependency
37
- name: rake
38
- requirement: !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- version: 10.0.3
44
- type: :development
45
- prerelease: false
46
- version_requirements: !ruby/object:Gem::Requirement
47
- none: false
48
- requirements:
49
- - - ~>
50
- - !ruby/object:Gem::Version
51
- version: 10.0.3
52
- - !ruby/object:Gem::Dependency
53
- name: rspec
54
- requirement: !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ~>
58
- - !ruby/object:Gem::Version
59
- version: 2.12.0
22
+ version: 1.3.5
60
23
  type: :development
61
24
  prerelease: false
62
25
  version_requirements: !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ~>
66
- - !ruby/object:Gem::Version
67
- version: 2.12.0
68
- - !ruby/object:Gem::Dependency
69
- name: yard
70
- requirement: !ruby/object:Gem::Requirement
71
- none: false
72
26
  requirements:
73
27
  - - ~>
74
28
  - !ruby/object:Gem::Version
75
- version: 0.8.5
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- none: false
80
- requirements:
81
- - - ~>
29
+ version: '1.3'
30
+ - - '>='
82
31
  - !ruby/object:Gem::Version
83
- version: 0.8.5
32
+ version: 1.3.5
84
33
  description: Module to declare abstract classes and methods
85
34
  email:
86
35
  - dan.kubb@gmail.com
@@ -93,8 +42,9 @@ extra_rdoc_files:
93
42
  files:
94
43
  - .gitignore
95
44
  - .rspec
96
- - .rvmrc
45
+ - .ruby-gemset
97
46
  - .travis.yml
47
+ - CONTRIBUTING.md
98
48
  - Gemfile
99
49
  - Gemfile.devtools
100
50
  - Guardfile
@@ -106,16 +56,11 @@ files:
106
56
  - config/flay.yml
107
57
  - config/flog.yml
108
58
  - config/mutant.yml
59
+ - config/reek.yml
109
60
  - config/roodi.yml
110
- - config/site.reek
111
61
  - config/yardstick.yml
112
62
  - lib/abstract_type.rb
113
63
  - lib/abstract_type/version.rb
114
- - spec/shared/command_method_behavior.rb
115
- - spec/shared/each_method_behaviour.rb
116
- - spec/shared/hash_method_behavior.rb
117
- - spec/shared/idempotent_method_behavior.rb
118
- - spec/shared/invertible_method_behaviour.rb
119
64
  - spec/spec_helper.rb
120
65
  - spec/support/config_alias.rb
121
66
  - spec/unit/abstract_type/class_methods/abstract_method_spec.rb
@@ -124,27 +69,26 @@ files:
124
69
  - spec/unit/abstract_type/class_methods/new_spec.rb
125
70
  homepage: https://github.com/dkubb/abstract_type
126
71
  licenses: []
72
+ metadata: {}
127
73
  post_install_message:
128
74
  rdoc_options: []
129
75
  require_paths:
130
76
  - lib
131
77
  required_ruby_version: !ruby/object:Gem::Requirement
132
- none: false
133
78
  requirements:
134
- - - ! '>='
79
+ - - '>='
135
80
  - !ruby/object:Gem::Version
136
81
  version: '0'
137
82
  required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
83
  requirements:
140
- - - ! '>='
84
+ - - '>='
141
85
  - !ruby/object:Gem::Version
142
86
  version: '0'
143
87
  requirements: []
144
88
  rubyforge_project:
145
- rubygems_version: 1.8.23
89
+ rubygems_version: 2.0.2
146
90
  signing_key:
147
- specification_version: 3
91
+ specification_version: 4
148
92
  summary: Module to declare abstract classes and methods
149
93
  test_files:
150
94
  - spec/unit/abstract_type/class_methods/abstract_method_spec.rb
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use @$(basename `pwd`) --create
@@ -1,7 +0,0 @@
1
- # encoding: utf-8
2
-
3
- shared_examples_for 'a command method' do
4
- it 'returns self' do
5
- should equal(object)
6
- end
7
- end
@@ -1,15 +0,0 @@
1
- # encoding: utf-8
2
-
3
- shared_examples_for 'an #each method' do
4
- it_should_behave_like 'a command method'
5
-
6
- context 'with no block' do
7
- subject { object.each }
8
-
9
- it { should be_instance_of(to_enum.class) }
10
-
11
- it 'yields the expected values' do
12
- subject.to_a.should eql(object.to_a)
13
- end
14
- end
15
- end
@@ -1,17 +0,0 @@
1
- # encoding: utf-8
2
-
3
- shared_examples_for 'a hash method' do
4
- it_should_behave_like 'an idempotent method'
5
-
6
- specification = proc do
7
- should be_instance_of(Fixnum)
8
- end
9
-
10
- it 'is a fixnum' do
11
- instance_eval(&specification)
12
- end
13
-
14
- it 'memoizes the hash code' do
15
- subject.should eql(object.memoized(:hash))
16
- end
17
- end
@@ -1,7 +0,0 @@
1
- # encoding: utf-8
2
-
3
- shared_examples_for 'an idempotent method' do
4
- it 'is idempotent' do
5
- should equal(instance_eval(&self.class.subject))
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- # encoding: utf-8
2
-
3
- shared_examples_for 'an invertible method' do
4
- it_should_behave_like 'an idempotent method'
5
-
6
- it 'is invertible' do
7
- subject.inverse.should equal(object)
8
- end
9
- end