public
Description: TextMate bundle - Amplified Mate Productivity
Homepage: http://code.leadmediapartners.com/tools/rubyamp
Clone URL: git://github.com/timcharper/rubyamp.git
bugfix - if Rspec{,Story}.tmbundle not found, return nil instead of error
timcharper (author)
Fri Oct 10 13:46:07 -0700 2008
commit  07c3c5b0c766d70e05858657b3b27bd60fd28e5d
tree    fa790d45bfa88296b0aa476740bbec5182327245
parent  545bcbaeffd5740f73fbd59ba019eac2303a3852
...
4
5
6
7
 
8
9
10
 
11
12
13
...
4
5
6
 
7
8
9
 
10
11
12
13
0
@@ -4,10 +4,10 @@ module RubyAMP::Config
0
   DEFAULTS = {
0
     "server_port" => 3000,
0
     "rspec_story_bundle_path" => lambda {
0
- RubyAMP::BUNDLES_ROOT + Dir.entries(RubyAMP::BUNDLES_ROOT).grep(/rspec.*story.*\.tmbundle/i).first
0
+ (RubyAMP::BUNDLES_ROOT + Dir.entries(RubyAMP::BUNDLES_ROOT).grep(/rspec.*story.*\.tmbundle/i).first) rescue nil
0
     },
0
     "rspec_bundle_path" => lambda {
0
- RubyAMP::BUNDLES_ROOT + Dir.entries(RubyAMP::BUNDLES_ROOT).grep(/rspec(?!.*story).*\.tmbundle/i).first
0
+ (RubyAMP::BUNDLES_ROOT + Dir.entries(RubyAMP::BUNDLES_ROOT).grep(/rspec(?!.*story).*\.tmbundle/i).first) rescue nil
0
     },
0
   }.freeze
0
   
...
48
49
50
 
 
 
 
 
 
51
52
53
...
48
49
50
51
52
53
54
55
56
57
58
59
0
@@ -48,5 +48,11 @@ describe RubyAMP::Config do
0
       Dir.stub!(:entries).and_return(%w[rspec-story-runner.tmBundle rspec.tmbundle])
0
       RubyAMP::Config::DEFAULTS["rspec_bundle_path"].call.should include("rspec.tmbundle")
0
     end
0
+
0
+ it "should return nil when rspec story runner bundle not found" do
0
+ Dir.stub!(:entries).and_return(%w[])
0
+ RubyAMP::Config::DEFAULTS["rspec_bundle_path"].call.should be_nil
0
+ RubyAMP::Config::DEFAULTS["rspec_story_bundle_path"].call.should be_nil
0
+ end
0
   end
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.