module CfScript::Output::Tests

Public Instance Methods

already_exists?(type, name) click to toggle source
# File lib/cf_script/output/tests.rb, line 47
def already_exists?(type, name)
  out.last_line_matches?(/#{type} #{name} already exists/)
end
authenticated?() click to toggle source
# File lib/cf_script/output/tests.rb, line 15
def authenticated?
  matches?(/Authenticating\.\.\.\nOK/m)
end
contains?(text) click to toggle source
# File lib/cf_script/output/tests.rb, line 7
def contains?(text)
  out.contains?(text)
end
credentials_rejected?() click to toggle source
# File lib/cf_script/output/tests.rb, line 35
def credentials_rejected?
  contains? 'Credentials were rejected'
end
failed?() click to toggle source
# File lib/cf_script/output/tests.rb, line 19
def failed?
  contains? 'FAILED'
end
is_already?(name, state) click to toggle source
# File lib/cf_script/output/tests.rb, line 43
def is_already?(name, state)
  out.last_line_matches?(/#{name} is already #{state}/)
end
matches?(regexp) click to toggle source
# File lib/cf_script/output/tests.rb, line 3
def matches?(regexp)
  out.matches?(regexp)
end
no_api_endpoint?() click to toggle source
# File lib/cf_script/output/tests.rb, line 23
def no_api_endpoint?
  contains? 'No API endpoint set'
end
not_authorized?() click to toggle source
# File lib/cf_script/output/tests.rb, line 31
def not_authorized?
  contains? 'You are not authorized'
end
not_found?(type, name) click to toggle source
# File lib/cf_script/output/tests.rb, line 39
def not_found?(type, name)
  out.last_line_matches?(/#{type} #{name} not found/)
end
not_logged_in?() click to toggle source
# File lib/cf_script/output/tests.rb, line 27
def not_logged_in?
  contains? 'Not logged in'
end
ok?() click to toggle source
# File lib/cf_script/output/tests.rb, line 11
def ok?
  out.last_line_matches?(/^OK$/)
end