aruba 0.4.4 → 0.4.5

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aruba (0.4.4)
4
+ aruba (0.4.5)
5
5
  bcat (>= 0.6.1)
6
6
  childprocess (>= 0.1.9)
7
7
  cucumber (>= 0.10.7)
data/History.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [v0.4.5](https://github.com/cucumber/aruba/compare/v0.4.4...v0.4.5)
2
+
3
+ * Better assertion failure message when an exit code is not as expected
4
+
1
5
  ## [v0.4.4](https://github.com/cucumber/aruba/compare/v0.4.3...v0.4.4)
2
6
 
3
7
  * Fix various bugs with interative processes. (Matt Wynne)
data/aruba.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'aruba'
5
- s.version = '0.4.4'
5
+ s.version = '0.4.5'
6
6
  s.authors = ["Aslak Hellesøy", "David Chelimsky", "Mike Sassak", "Matt Wynne"]
7
7
  s.description = 'CLI Steps for Cucumber, hand-crafted for you in Aruba'
8
8
  s.summary = "aruba-#{s.version}"
data/lib/aruba/api.rb CHANGED
@@ -185,11 +185,17 @@ module Aruba
185
185
  end
186
186
 
187
187
  def assert_exit_status(status)
188
- last_exit_status.should == status
188
+ last_exit_status.should eq(status),
189
+ append_output_to("Exit status was #{last_exit_status} but expected it to be #{status}.")
189
190
  end
190
191
 
191
192
  def assert_not_exit_status(status)
192
- last_exit_status.should_not == status
193
+ last_exit_status.should_not eq(status),
194
+ append_output_to("Exit status was #{last_exit_status} which was not expected.")
195
+ end
196
+
197
+ def append_output_to(message)
198
+ "#{message} Output:\n\n#{all_output}\n"
193
199
  end
194
200
 
195
201
  def processes
@@ -248,11 +254,8 @@ module Aruba
248
254
  run(cmd) do |process|
249
255
  stop_process(process)
250
256
  end
251
- @timed_out = @last_exit_status.nil?
252
-
253
- if(@last_exit_status != 0 && fail_on_error)
254
- fail("Exit status was #{@last_exit_status}. Output:\n#{all_output}")
255
- end
257
+ @timed_out = last_exit_status.nil?
258
+ assert_exit_status(0) if fail_on_error
256
259
  end
257
260
 
258
261
  def run_interactive(cmd)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: aruba
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.4
5
+ version: 0.4.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Aslak Helles\xC3\xB8y"
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - ">="
133
133
  - !ruby/object:Gem::Version
134
- hash: 1265581284183582104
134
+ hash: -3484798014470799758
135
135
  segments:
136
136
  - 0
137
137
  version: "0"
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
- hash: 1265581284183582104
143
+ hash: -3484798014470799758
144
144
  segments:
145
145
  - 0
146
146
  version: "0"
@@ -150,7 +150,7 @@ rubyforge_project:
150
150
  rubygems_version: 1.7.2
151
151
  signing_key:
152
152
  specification_version: 3
153
- summary: aruba-0.4.4
153
+ summary: aruba-0.4.5
154
154
  test_files:
155
155
  - features/exit_statuses.feature
156
156
  - features/file_system_commands.feature