public
Rubygem
Description: Simple tool to help track git and svn vendor branches in a git repository
Homepage: http://evil.che.lu/projects/braid
Clone URL: git://github.com/evilchelu/braid.git
Fix the specs.
norbert (author)
Mon Apr 21 06:12:11 -0700 2008
commit  f6ef26e26489b90c5d47224965891434b651211f
tree    a166c809455cf3b8d98cb9144ba9beb3eb24e200
parent  5edc17f6e20df52e0eadb5907179bd3f9e06734f
...
2
3
4
5
6
7
8
9
10
11
 
12
13
...
2
3
4
 
5
6
7
8
9
 
10
11
12
0
@@ -2,12 +2,11 @@ begin
0
   require 'spec'
0
 rescue LoadError
0
   require 'rubygems'
0
- #gem 'rspec'
0
   require 'spec'
0
 end
0
 
0
 dir = File.dirname(__FILE__)
0
 lib_path = File.expand_path("#{dir}/../lib")
0
-$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
0
+$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
0
 
0
 require 'braid'
...
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
 
14
15
16
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
19
20
21
 
 
 
...
1
 
 
2
3
 
 
 
4
5
 
 
 
6
7
8
9
10
11
 
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
@@ -1,21 +1,32 @@
0
 begin
0
- require 'spec'
0
-rescue LoadError
0
   require 'rubygems'
0
   require 'spec'
0
-end
0
-begin
0
- require 'spec/rake/spectask'
0
 rescue LoadError
0
   puts <<-EOS
0
-To use rspec for testing you must install rspec gem:
0
- gem install rspec
0
-EOS
0
+ To run the specs you must install the rspec gem:
0
+ . gem install rspec
0
+ EOS
0
   exit(0)
0
 end
0
 
0
-desc "Run the specs under spec/models"
0
+# all this just to change the default task
0
+Rake::TaskManager.class_eval do
0
+ def remove_task(task_name)
0
+ @tasks.delete(task_name.to_s)
0
+ end
0
+end
0
+
0
+def remove_task(task_name)
0
+ Rake.application.remove_task(task_name)
0
+end
0
+
0
+require 'spec/rake/spectask'
0
+
0
+desc "Run the specs."
0
 Spec::Rake::SpecTask.new do |t|
0
   t.spec_opts = ['--options', "spec/spec.opts"]
0
   t.spec_files = FileList['spec/*_spec.rb']
0
 end
0
+
0
+remove_task :default
0
+task :default => :spec

Comments

    No one has commented yet.