Module: RakeTaskOutputHelpers

Extended by:
ActiveSupport::Concern
Defined in:
lib/decidim/dev/test/rspec_support/rake_tasks.rb

Overview

A collection of methods to help dealing with rake tasks output.

Instance Method Summary collapse

Instance Method Details

#check_error_printed(type) ⇒ Object



54
55
56
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 54

def check_error_printed(type)
  expect($stdout.string).to include("ERROR: [#{type}]")
end

#check_message_printed(message) ⇒ Object



58
59
60
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 58

def check_message_printed(message)
  expect($stdout.string).to include(message)
end

#check_no_errors_have_been_printedObject



46
47
48
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 46

def check_no_errors_have_been_printed
  expect($stdout.string).not_to include("ERROR:")
end

#check_some_errors_have_been_printedObject



50
51
52
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 50

def check_some_errors_have_been_printed
  expect($stdout.string).to include("ERROR:")
end