features/steps/gitcycle_steps.rb in gitcycle-0.1.8 vs features/steps/gitcycle_steps.rb in gitcycle-0.1.9
- old
+ new
@@ -85,11 +85,11 @@
def run_gitcycle(cmd)
@output = ''
@gitcycle = Gitcycle.new
@gitcycle.stub(:puts) do |str|
str = str.gsub(/\e\[\d{1,2}m/, '')
- @output << str
+ @output << "#{str}\n"
puts str
end
if cmd
@gitcycle.start(Shellwords.split(cmd))
else
@@ -195,15 +195,15 @@
$url = @output.match(/#{expected}.*(https?:\/\/[^\s]+)/)[1]
end
Then /^output includes$/ do |expected|
expected = gsub_variables(expected)
- @output.include?(expected).should == true
+ @output.gsub(/\n+/, "\n").include?(expected).should == true
end
Then /^output does not include \"([^\"]*)"$/ do |expected|
expected = gsub_variables(expected)
- @output.gsub(/\n+/, "\n").include?(expected).should == false
+ @output.include?(expected).should == false
end
Then /^redis entries valid$/ do
add = @scenario_title.include?('custom branch name') ? "-rename" : ""
branch = $redis.hget(
\ No newline at end of file