respec 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  /*.gem
2
+ /Gemfile.lock
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.3 2012-05-24
2
+
3
+ * Add shortcuts for debugger (d) and DRb (x).
4
+
1
5
  == 0.0.2 2012-05-23
2
6
 
3
7
  * Run through bundler if Gemfile is present.
data/lib/respec/app.rb CHANGED
@@ -94,6 +94,10 @@ module Respec
94
94
  end
95
95
  elsif arg == 's'
96
96
  @formatter = 'specdoc'
97
+ elsif arg == 'd'
98
+ args << '--debugger'
99
+ elsif arg =~ /\A[xX]\z/
100
+ args << '--drb'
97
101
  elsif arg == 'c'
98
102
  args << '--diff' << 'context'
99
103
  elsif arg =~ /\A\d+\z/
@@ -1,5 +1,5 @@
1
1
  module Respec
2
- VERSION = [0, 0, 2]
2
+ VERSION = [0, 0, 3]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
@@ -28,23 +28,21 @@ describe Respec::App do
28
28
  end
29
29
 
30
30
  it "should check the BUNDLE_GEMFILE environment variable if set" do
31
- original_bundle_gemfile = ENV['BUNDLE_GEMFILE']
32
- ENV['BUNDLE_GEMFILE'] = "#{tmp}/custom_gemfile"
33
- begin
31
+ with_hash_value ENV, 'BUNDLE_GEMFILE', "#{tmp}/custom_gemfile" do
34
32
  FileUtils.touch "#{tmp}/custom_gemfile"
35
33
  Dir.chdir tmp do
36
34
  app = Respec::App.new
37
35
  app.bundler_args.should == ['bundle', 'exec']
38
36
  end
39
- ensure
40
- ENV['BUNDLE_GEMFILE'] = original_bundle_gemfile
41
37
  end
42
38
  end
43
39
 
44
40
  it "should not run through bundler if no Gemfile is present" do
45
- Dir.chdir tmp do
46
- app = Respec::App.new
47
- app.bundler_args.should == []
41
+ with_hash_value ENV, 'BUNDLE_GEMFILE', nil do
42
+ Dir.chdir tmp do
43
+ app = Respec::App.new
44
+ app.bundler_args.should == []
45
+ end
48
46
  end
49
47
  end
50
48
  end
@@ -90,6 +88,21 @@ describe Respec::App do
90
88
  app.generated_args.should == ['a.rb:1', 'b.rb:2']
91
89
  end
92
90
 
91
+ it "should run via the debugger if 'd' is given" do
92
+ app = Respec::App.new('d')
93
+ app.generated_args.should == ['--debugger']
94
+ end
95
+
96
+ it "should run via DRb if 'X' is given" do
97
+ app = Respec::App.new('X')
98
+ app.generated_args.should == ['--drb']
99
+ end
100
+
101
+ it "should run via DRb if 'x' is given" do
102
+ app = Respec::App.new('x')
103
+ app.generated_args.should == ['--drb']
104
+ end
105
+
93
106
  it "should run the n-th failure if a numeric argument 'n' is given" do
94
107
  make_failures_file 'a.rb:1', 'b.rb:2'
95
108
  app = Respec::App.new('2')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: respec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-23 00:00:00.000000000 Z
12
+ date: 2012-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -94,18 +94,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- segments:
98
- - 0
99
- hash: -3838848027574177683
100
97
  required_rubygems_version: !ruby/object:Gem::Requirement
101
98
  none: false
102
99
  requirements:
103
100
  - - ! '>='
104
101
  - !ruby/object:Gem::Version
105
102
  version: '0'
106
- segments:
107
- - 0
108
- hash: -3838848027574177683
109
103
  requirements: []
110
104
  rubyforge_project:
111
105
  rubygems_version: 1.8.24