
Untitled
By: a guest on
Aug 6th, 2012 | syntax:
None | size: 0.88 KB | hits: 9 | expires: Never
Why does cucumber with aruba not see the output of my program?
Then the stdout should contain "test" # aruba-0.4.11/lib/aruba/cucumber.rb:82
expected "" to include "test" (RSpec::Expectations::ExpectationNotMetError)
features/test.feature:13:in `Then the output should contain "test"'
Scenario: echo test
Given a blank slate
When I run `echo "test"`
The stdout should contain "test"
Scenario: puts test
Given a blank slate
When I start the program
The stdout should contain "test"
When /^I start the program$/ do
TestModule::Main.new.start
end
module TestModule
class Main
def initialize
end
def start
$stdout.puts "test"
end
end
end
def initialize(output=$stdout)
When /^I start the program$/ do
TestModule::Main.new(@output).start
end
Then the stdout should contain "(.+)" do |string|
@output.should include string
end