Class: GreenPepper::DoWithExample
Constant Summary
ExampleWithFixture::EXAMPLE_NAME_COLUMN, ExampleWithFixture::EXAMPLE_NAME_ROW, ExampleWithFixture::FIRST_DATA_ROW, ExampleWithFixture::FIXTURE_NAME_COLUMN, ExampleWithFixture::FIXTURE_NAME_ROW, ExampleWithFixture::HEADER_ROW
Instance Attribute Summary collapse
#fixture_arguments, #fixture_name, #headers
Instance Method Summary
collapse
-
#add_accept(function, result_column, *params) ⇒ Object
-
#add_check(function, result_column, expected_val, *params) ⇒ Object
-
#add_function_call(function, result_column, *params) ⇒ Object
-
#add_reject(function, result_column, *params) ⇒ Object
-
#do_execute(results, fixture_class) ⇒ Object
-
#initialize(fixture_name, line_factory = DoWithLineFactory.new) ⇒ DoWithExample
constructor
A new instance of DoWithExample.
#add_fixture_argument, #execute
Constructor Details
#initialize(fixture_name, line_factory = DoWithLineFactory.new) ⇒ DoWithExample
16
17
18
19
20
|
# File 'lib/greenpepper/example/dowithexample.rb', line 16
def initialize(fixture_name, line_factory = DoWithLineFactory.new)
super fixture_name
@lines = []
@line_factory = line_factory
end
|
Instance Attribute Details
#lines ⇒ Object
Returns the value of attribute lines.
14
15
16
|
# File 'lib/greenpepper/example/dowithexample.rb', line 14
def lines
@lines
end
|
Instance Method Details
#add_accept(function, result_column, *params) ⇒ Object
55
56
57
|
# File 'lib/greenpepper/example/dowithexample.rb', line 55
def add_accept(function, result_column, *params)
@lines << @line_factory.create_accept(function, result_column, params)
end
|
#add_check(function, result_column, expected_val, *params) ⇒ Object
50
51
52
53
|
# File 'lib/greenpepper/example/dowithexample.rb', line 50
def add_check(function, result_column, expected_val, *params)
@lines << @line_factory.create_check(function,
result_column, expected_val, params)
end
|
#add_function_call(function, result_column, *params) ⇒ Object
45
46
47
48
|
# File 'lib/greenpepper/example/dowithexample.rb', line 45
def add_function_call(function, result_column, *params)
@lines << @line_factory.create_function_call(function,
result_column, params)
end
|
#add_reject(function, result_column, *params) ⇒ Object
59
60
61
|
# File 'lib/greenpepper/example/dowithexample.rb', line 59
def add_reject(function, result_column, *params)
@lines << @line_factory.create_reject(function, result_column, params)
end
|
#do_execute(results, fixture_class) ⇒ Object