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



52
53
54
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 52

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

#check_message_printed(message) ⇒ Object



56
57
58
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 56

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

#check_no_errors_have_been_printedObject



44
45
46
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 44

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

#check_some_errors_have_been_printedObject



48
49
50
# File 'lib/decidim/dev/test/rspec_support/rake_tasks.rb', line 48

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