Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Devtools.init_spec_helper

  • Loading branch information...
commit 1114a156e58da8128b67cbc55cf6d30b6acf3b48 1 parent a722648
Markus Schirp authored
View
4 Rakefile
@@ -1,4 +1,2 @@
-require 'rake'
require 'devtools'
-
-Devtools.init
+Devtools.init_rake_tasks
View
7 spec/shared/command_method_behavior.rb
@@ -1,7 +0,0 @@
-# encoding: utf-8
-
-shared_examples_for 'a command method' do
- it 'returns self' do
- should equal(object)
- end
-end
View
15 spec/shared/each_method_behaviour.rb
@@ -1,15 +0,0 @@
-# encoding: utf-8
-
-shared_examples_for 'an #each method' do
- it_should_behave_like 'a command method'
-
- context 'with no block' do
- subject { object.each }
-
- it { should be_instance_of(to_enum.class) }
-
- it 'yields the expected values' do
- subject.to_a.should eql(object.to_a)
- end
- end
-end
View
17 spec/shared/hash_method_behavior.rb
@@ -1,17 +0,0 @@
-# encoding: utf-8
-
-shared_examples_for 'a hash method' do
- it_should_behave_like 'an idempotent method'
-
- specification = proc do
- should be_instance_of(Fixnum)
- end
-
- it 'is a fixnum' do
- instance_eval(&specification)
- end
-
- it 'memoizes the hash code' do
- subject.should eql(object.memoized(:hash))
- end
-end
View
9 spec/shared/idempotent_method_behavior.rb
@@ -1,9 +0,0 @@
-# encoding: utf-8
-
-shared_examples_for 'an idempotent method' do
- it 'is idempotent' do
- first = subject
- __memoized.delete(:subject)
- should equal(first)
- end
-end
View
9 spec/shared/invertible_method_behaviour.rb
@@ -1,9 +0,0 @@
-# encoding: utf-8
-
-shared_examples_for 'an invertible method' do
- it_should_behave_like 'an idempotent method'
-
- it 'is invertible' do
- subject.inverse.should equal(object)
- end
-end
View
6 spec/spec_helper.rb
@@ -1,9 +1,7 @@
# encoding: utf-8
-require 'rspec'
-
-# require spec support files and shared behavior
-Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each { |f| require(f) }
+require 'devtools'
+Devtools.init_spec_helper
$: << File.join(TestApp.root,'lib')
Please sign in to comment.
Something went wrong with that request. Please try again.