aruba-doubles 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'aruba-doubles'
5
- s.version = '0.2.1'
5
+ s.version = '0.2.2'
6
6
  s.authors = ["Björn Albers"]
7
7
  s.email = ["bjoernalbers@googlemail.com"]
8
8
  s.description = 'Stub command line applications with Cucumber'
@@ -27,12 +27,11 @@ module ArubaDoubles
27
27
  f.puts "#!/usr/bin/env ruby"
28
28
  f.puts "# Doubled command line application by aruba-doubles\n"
29
29
  f.puts "require 'rubygems'"
30
+ f.puts "require 'yaml'"
30
31
  f.puts "require 'aruba-doubles/double'"
31
- f.puts "double = ArubaDoubles::Double.new(#{double.expectations.inspect})"
32
- f.puts "double.run"
33
- f.puts "puts double.stdout if double.stdout"
34
- f.puts "warn double.stderr if double.stderr"
35
- f.puts "exit(double.exit_status) if double.exit_status"
32
+ f.puts "ArubaDoubles::Double.run! YAML.load %Q{"
33
+ f.puts double.expectations.to_yaml
34
+ f.puts "}"
36
35
  end
37
36
  FileUtils.chmod(0755, fullpath)
38
37
  end
@@ -2,6 +2,14 @@ module ArubaDoubles
2
2
  class Double
3
3
  attr_reader :stdout, :stderr, :exit_status, :expectations
4
4
 
5
+ def self.run!(expectations = {})
6
+ double = self.new(expectations)
7
+ double.run
8
+ puts double.stdout if double.stdout
9
+ warn double.stderr if double.stderr
10
+ exit(double.exit_status) if double.exit_status
11
+ end
12
+
5
13
  def initialize(expectations = {})
6
14
  @expectations = expectations
7
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aruba-doubles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-13 00:00:00.000000000Z
12
+ date: 2011-12-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
16
- requirement: &70225278399380 !ruby/object:Gem::Requirement
16
+ requirement: &70125085259300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70225278399380
24
+ version_requirements: *70125085259300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: aruba
27
- requirement: &70225278398360 !ruby/object:Gem::Requirement
27
+ requirement: &70125085258540 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.4.6
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70225278398360
35
+ version_requirements: *70125085258540
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: guard-cucumber
38
- requirement: &70225278397520 !ruby/object:Gem::Requirement
38
+ requirement: &70125085257880 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.7.3
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70225278397520
46
+ version_requirements: *70125085257880
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard-rspec
49
- requirement: &70225278393980 !ruby/object:Gem::Requirement
49
+ requirement: &70125085257180 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 0.5.1
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70225278393980
57
+ version_requirements: *70125085257180
58
58
  description: Stub command line applications with Cucumber
59
59
  email:
60
60
  - bjoernalbers@googlemail.com
@@ -104,7 +104,7 @@ rubyforge_project:
104
104
  rubygems_version: 1.8.10
105
105
  signing_key:
106
106
  specification_version: 3
107
- summary: aruba-doubles-0.2.1
107
+ summary: aruba-doubles-0.2.2
108
108
  test_files:
109
109
  - features/double.feature
110
110
  - features/environment-friendly.feature