Class: Webspicy::Web::Specification::TestCase
Instance Attribute Summary
#counterexample, #service
Instance Method Summary
collapse
#assert, #bind, #counterexample?, #description, #example?, #expected, #expected_error, #has_assertions?, #has_expected_error?, info, #initialize, #metadata, #mutate, #seeds, #specification, #tags, #to_s
#initialize, #method_missing, #to_info
Instance Method Details
#body ⇒ Object
19
20
21
|
# File 'lib/webspicy/web/specification/test_case.rb', line 19
def body
@raw[:body]
end
|
#dress_params ⇒ Object
Also known as:
dress_params?
10
11
12
|
# File 'lib/webspicy/web/specification/test_case.rb', line 10
def dress_params
@raw.fetch(:dress_params){ true }
end
|
#expected_content_type ⇒ Object
31
32
33
|
# File 'lib/webspicy/web/specification/test_case.rb', line 31
def expected_content_type
expected[:content_type]
end
|
47
48
49
|
# File 'lib/webspicy/web/specification/test_case.rb', line 47
def
expected[:headers] || {}
end
|
#expected_status ⇒ Object
35
36
37
|
# File 'lib/webspicy/web/specification/test_case.rb', line 35
def expected_status
expected[:status]
end
|
#file_upload ⇒ Object
23
24
25
|
# File 'lib/webspicy/web/specification/test_case.rb', line 23
def file_upload
@raw[:file_upload]
end
|
51
52
53
|
# File 'lib/webspicy/web/specification/test_case.rb', line 51
def
!.empty?
end
|
#has_expected_status? ⇒ Boolean
43
44
45
|
# File 'lib/webspicy/web/specification/test_case.rb', line 43
def has_expected_status?
not expected[:status].nil?
end
|
6
7
8
|
# File 'lib/webspicy/web/specification/test_case.rb', line 6
def
@raw[:headers] ||= {}
end
|
#is_expected_status?(status) ⇒ Boolean
39
40
41
|
# File 'lib/webspicy/web/specification/test_case.rb', line 39
def is_expected_status?(status)
expected_status === status
end
|
#located_file_upload ⇒ Object
27
28
29
|
# File 'lib/webspicy/web/specification/test_case.rb', line 27
def located_file_upload
file_upload ? file_upload.locate(specification) : nil
end
|
#params ⇒ Object
15
16
17
|
# File 'lib/webspicy/web/specification/test_case.rb', line 15
def params
@raw[:params] || {}
end
|