Class: AutoTest::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_test.rb

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



34
35
36
37
38
39
40
# File 'lib/auto_test.rb', line 34

def initialize        
  Test.initialize_test
  Rails.logger.level = 1
  DatabaseCleaner.strategy = :truncation
  DatabaseCleaner.start
  DatabaseCleaner.clean
end

Instance Method Details

#always_present(class_name, key, value) ⇒ Object

add an array of the classname, key and value of the object to be checked every cycle



60
61
62
# File 'lib/auto_test.rb', line 60

def always_present(class_name, key, value)
  Dsl.always_present(class_name, key, value)
end

#get_users_from_db(user_class_name, bool) ⇒ Object



64
65
66
# File 'lib/auto_test.rb', line 64

def get_users_from_db(user_class_name, bool)
  Dsl.get_users_from_db(user_class_name, bool)
end


47
48
49
# File 'lib/auto_test.rb', line 47

def links_to_exclude(*links)
  Dsl.links_to_exclude(*links)
end

#set_input(input, *values) ⇒ Object

for the name or part of the name of an input field, decide, which values to use if not set, random values matching the input type are used



78
79
80
# File 'lib/auto_test.rb', line 78

def set_input(input, *values)
  Dsl.set_input(input, *values)
end

#set_login_attribute_names(logins, fields) ⇒ Object

set the attribute_names and fields that are needed to login the argument is a list of pairs [attribute_name, field]



95
96
97
# File 'lib/auto_test.rb', line 95

def (logins, fields)
  Dsl.(logins, fields)
end

#set_login_data(*data) ⇒ Object



72
73
74
# File 'lib/auto_test.rb', line 72

def (*data)
  Dsl.(*data)
end

#set_login_path(path) ⇒ Object

set the login path



89
90
91
# File 'lib/auto_test.rb', line 89

def (path)
  Dsl.(path)
end

#set_logout_path(path) ⇒ Object



107
108
109
# File 'lib/auto_test.rb', line 107

def set_logout_path(path)
  Dsl.set_logout_path(path)
end

#set_max_depth(value) ⇒ Object



51
52
53
# File 'lib/auto_test.rb', line 51

def set_max_depth(value)
  Dsl.set_max_depth(value)
end


99
100
101
# File 'lib/auto_test.rb', line 99

def set_max_number_of_session_links(no)
  Dsl.set_max_number_of_session_links(no)
end

#set_no_authObject



103
104
105
# File 'lib/auto_test.rb', line 103

def set_no_auth
  Dsl.set_no_auth
end

#set_number_of_sessions(number) ⇒ Object



55
56
57
# File 'lib/auto_test.rb', line 55

def set_number_of_sessions(number)
  Dsl.set_number_of_sessions(number)
end

#set_number_of_test_runs(number) ⇒ Object



115
116
117
# File 'lib/auto_test.rb', line 115

def set_number_of_test_runs(number)
  Dsl.set_number_of_test_runs(number)
end

#set_object_dependency(child, parent, attribute_name) ⇒ Object

for all objects of class child, there has to be one object of class parent attribute_name is the column that joins the two tables



84
85
86
# File 'lib/auto_test.rb', line 84

def set_object_dependency(child, parent, attribute_name)
  Dsl.set_object_dependency(child, parent, attribute_name)
end

#set_unique_login_attribute_name(name) ⇒ Object



68
69
70
# File 'lib/auto_test.rb', line 68

def (name)
  Dsl.(name)
end

#stop_at_first_error(stop_at_first_error) ⇒ Object



111
112
113
# File 'lib/auto_test.rb', line 111

def stop_at_first_error(stop_at_first_error) 
  Dsl.stop_at_first_error(stop_at_first_error) 
end

#use_fixtures(bool) ⇒ Object



42
43
44
# File 'lib/auto_test.rb', line 42

def use_fixtures(bool)  
  Test.use_fixtures(bool)
end