washout_builder 0.14.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -2
  3. data/.rubocop.yml +68 -0
  4. data/.travis.yml +1 -1
  5. data/Appraisals +9 -1
  6. data/Gemfile +2 -3
  7. data/Rakefile +17 -20
  8. data/app/controllers/washout_builder/washout_builder_controller.rb +79 -79
  9. data/app/helpers/washout_builder_complex_type_helper.rb +16 -23
  10. data/app/helpers/washout_builder_fault_type_helper.rb +12 -13
  11. data/app/helpers/washout_builder_method_arguments_helper.rb +24 -26
  12. data/app/helpers/washout_builder_method_list_helper.rb +16 -11
  13. data/app/helpers/washout_builder_method_return_type_helper.rb +14 -12
  14. data/app/views/wash_with_html/doc.builder +2 -2
  15. data/bin/appraisal +16 -0
  16. data/bin/autospec +16 -0
  17. data/bin/bundler +16 -0
  18. data/bin/cdiff +16 -0
  19. data/bin/coderay +16 -0
  20. data/bin/colortab +16 -0
  21. data/bin/coveralls +16 -0
  22. data/bin/decolor +16 -0
  23. data/bin/erubis +16 -0
  24. data/bin/guard +16 -0
  25. data/bin/htmldiff +16 -0
  26. data/bin/ldiff +16 -0
  27. data/bin/listen +16 -0
  28. data/bin/nokogiri +16 -0
  29. data/bin/phare +16 -0
  30. data/bin/pry +16 -0
  31. data/bin/rackup +16 -0
  32. data/bin/rails +16 -0
  33. data/bin/rake +16 -0
  34. data/bin/restclient +16 -0
  35. data/bin/rspec +16 -0
  36. data/bin/rubocop +16 -0
  37. data/bin/ruby-parse +16 -0
  38. data/bin/ruby-rewrite +16 -0
  39. data/bin/sass +16 -0
  40. data/bin/sass-convert +16 -0
  41. data/bin/scss +16 -0
  42. data/bin/scss-lint +16 -0
  43. data/bin/term_display +16 -0
  44. data/bin/term_mandel +16 -0
  45. data/bin/thor +16 -0
  46. data/bin/uuid +16 -0
  47. data/config/routes.rb +3 -3
  48. data/init.rb +1 -1
  49. data/lib/washout_builder.rb +20 -29
  50. data/lib/washout_builder/document/complex_type.rb +70 -75
  51. data/lib/washout_builder/document/exception_model.rb +46 -51
  52. data/lib/washout_builder/document/generator.rb +56 -66
  53. data/lib/washout_builder/document/shared_complex_type.rb +2 -4
  54. data/lib/washout_builder/engine.rb +1 -2
  55. data/lib/washout_builder/soap.rb +6 -10
  56. data/lib/washout_builder/type.rb +9 -23
  57. data/lib/washout_builder/version.rb +5 -5
  58. data/spec/app/controllers/washout_builder_controller_spec.rb +26 -28
  59. data/spec/app/helpers/washout_builder_complex_type_helper_spec.rb +37 -45
  60. data/spec/app/helpers/washout_builder_fault_type_helper_spec.rb +65 -77
  61. data/spec/app/helpers/washout_builder_method_arguments_helper_spec.rb +65 -76
  62. data/spec/app/helpers/washout_builder_method_list_helper_spec.rb +30 -35
  63. data/spec/app/helpers/washout_builder_method_return_type_helper_spec.rb +25 -27
  64. data/spec/dummy/config/application.rb +4 -4
  65. data/spec/dummy/config/boot.rb +1 -1
  66. data/spec/dummy/config/environments/development.rb +2 -3
  67. data/spec/dummy/config/environments/test.rb +3 -3
  68. data/spec/dummy/config/initializers/secret_token.rb +1 -1
  69. data/spec/dummy/config/initializers/session_store.rb +1 -1
  70. data/spec/dummy/config/routes.rb +0 -1
  71. data/spec/dummy/script/rails +2 -2
  72. data/spec/integration/washout_builder_all_services_spec.rb +2 -5
  73. data/spec/integration/washout_builder_service_spec.rb +2 -5
  74. data/spec/lib/washout_builder/document/complex_type_spec.rb +98 -118
  75. data/spec/lib/washout_builder/document/exception_model_spec.rb +49 -54
  76. data/spec/lib/washout_builder/document/generator_spec.rb +93 -118
  77. data/spec/lib/washout_builder/type_spec.rb +17 -29
  78. data/spec/lib/washout_builder_spec.rb +293 -308
  79. data/spec/spec_helper.rb +24 -30
  80. data/spec/support/complex_types/fluffy.rb +3 -3
  81. data/spec/support/complex_types/fluffy_container.rb +3 -3
  82. data/spec/support/complex_types/project_type.rb +4 -5
  83. data/spec/support/complex_types/test_type.rb +4 -4
  84. data/washout_builder.gemspec +5 -2
  85. metadata +78 -3
@@ -1,86 +1,78 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe WashoutBuilderComplexTypeHelper, :type => :helper do
4
-
3
+ describe WashoutBuilderComplexTypeHelper, type: :helper do
5
4
  context '#create_element_type_html' do
6
- let (:pre) { [] }
7
- let(:element_name) {"custom_name"}
8
- let(:element) {mock}
9
-
5
+ let(:pre) { [] }
6
+ let(:element_name) { 'custom_name' }
7
+ let(:element) { mock }
8
+
10
9
  before(:each) do
11
- element.stubs(:type).returns("text")
12
- element.stubs(:type=).with("string")
10
+ element.stubs(:type).returns('text')
11
+ element.stubs(:type=).with('string')
13
12
  element.stubs(:name).returns(element_name)
14
13
  end
15
-
14
+
16
15
  def expect_included_type_result(pre, element)
17
16
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(element.type).returns(true)
18
- result =helper.create_element_type_html(pre, element)
17
+ result = helper.create_element_type_html(pre, element)
19
18
  result.should eq(["<span class='blue'>#{element.type}</span>&nbsp;<span class='bold'>#{element.name}</span>"])
20
19
  end
21
-
20
+
22
21
  def expect_excluded_type_result(pre, element)
23
22
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(element.type).returns(false)
24
23
  helper.expects(:create_complex_element_type_html).with(pre, element)
25
24
  helper.create_element_type_html(pre, element)
26
25
  end
27
-
28
-
29
- it "returns the element of type text" do
30
- element.expects(:type=).with("string")
26
+
27
+ it 'returns the element of type text' do
28
+ element.expects(:type=).with('string')
31
29
  expect_included_type_result(pre, element)
32
30
  end
33
-
34
- it "returns the element of type text" do
31
+
32
+ it 'returns the element of type text' do
35
33
  expect_excluded_type_result(pre, element)
36
34
  end
37
-
38
- it "returns the element of type integer" do
39
- element.stubs(:type).returns("int")
40
- element.expects(:type=).with("integer")
35
+
36
+ it 'returns the element of type integer' do
37
+ element.stubs(:type).returns('int')
38
+ element.expects(:type=).with('integer')
41
39
  expect_included_type_result(pre, element)
42
40
  end
43
41
 
44
- it "returns the element of type integer" do
45
- element.stubs(:type).returns("int")
46
- element.expects(:type=).with("integer")
42
+ it 'returns the element of type integer' do
43
+ element.stubs(:type).returns('int')
44
+ element.expects(:type=).with('integer')
47
45
  expect_excluded_type_result(pre, element)
48
46
  end
49
-
50
-
51
47
  end
52
-
53
-
54
- context "create_complex_element_type_html" do
55
- let (:pre) { [] }
56
- let(:element_name) {"custom_name"}
57
- let(:complex_class) {"SomeClass"}
58
- let(:element) {mock}
59
-
48
+
49
+ context 'create_complex_element_type_html' do
50
+ let(:pre) { [] }
51
+ let(:element_name) { 'custom_name' }
52
+ let(:complex_class) { 'SomeClass' }
53
+ let(:element) { mock }
54
+
60
55
  before(:each) do
61
- element.stubs(:get_complex_class_name).returns(complex_class)
56
+ element.stubs(:find_complex_class_name).returns(complex_class)
62
57
  element.stubs(:multiplied).returns(false)
63
58
  element.stubs(:name).returns(element_name)
64
59
  end
65
-
66
- it "returna simple type element description" do
60
+
61
+ it 'returna simple type element description' do
67
62
  result = helper.create_complex_element_type_html(pre, element)
68
63
  result.should eq(["<a href='##{complex_class}'><span class='lightBlue'>#{complex_class}</span></a>&nbsp;<span class='bold'>#{element.name}</span>"])
69
64
  end
70
-
71
- it "returns an array type element description" do
65
+
66
+ it 'returns an array type element description' do
72
67
  element.stubs(:multiplied).returns(true)
73
68
  result = helper.create_complex_element_type_html(pre, element)
74
69
  result.should eq(["<a href='##{complex_class}'><span class='lightBlue'>Array of #{complex_class}</span></a>&nbsp;<span class='bold'>#{element.name}</span>"])
75
70
  end
76
-
77
- it "returns empty if no complex class" do
78
- element.stubs(:get_complex_class_name).returns(nil)
71
+
72
+ it 'returns empty if no complex class' do
73
+ element.stubs(:find_complex_class_name).returns(nil)
79
74
  result = helper.create_complex_element_type_html(pre, element)
80
75
  result.should eq(nil)
81
76
  end
82
-
83
77
  end
84
-
85
-
86
78
  end
@@ -1,139 +1,127 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
- describe WashoutBuilderFaultTypeHelper, :type => :helper do
4
-
5
- context " create_fault_model_complex_element_type" do
3
+ describe WashoutBuilderFaultTypeHelper, type: :helper do
4
+ context ' create_fault_model_complex_element_type' do
6
5
  let(:pre) { [] }
7
- let(:attr_primitive){ "string"}
8
- let(:attribute) {"custom_attribute"}
9
-
6
+ let(:attr_primitive) { 'string' }
7
+ let(:attribute) { 'custom_attribute' }
8
+
10
9
  def check_result(array)
11
10
  attribute_primitive = array == true ? "Array of #{attr_primitive}" : "#{attr_primitive}"
12
11
  result = helper. create_fault_model_complex_element_type(pre, attr_primitive, attribute, array)
13
12
  result.should eq(["<a href='##{attr_primitive}'><span class='lightBlue'> #{attribute_primitive}</span></a>&nbsp;<span class='bold'>#{attribute}</span>"])
14
13
  end
15
-
16
- it "creates an array element " do
14
+
15
+ it 'creates an array element ' do
17
16
  check_result(true)
18
17
  end
19
- it "creates an simple element " do
18
+ it 'creates an simple element ' do
20
19
  check_result(false)
21
20
  end
22
21
  end
23
-
24
- context "member_type_is_basic?" do
25
-
26
- it "returns a basic type" do
27
- attr_details = {:member_type => "STRING"}
22
+
23
+ context 'member_type_is_basic?' do
24
+ it 'returns a basic type' do
25
+ attr_details = { member_type: 'STRING' }
28
26
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(attr_details[:member_type].to_s.downcase).returns(true)
29
27
  result = helper.member_type_is_basic?(attr_details)
30
28
  result.should eq(attr_details[:member_type].to_s.downcase)
31
29
  end
32
-
33
- it "returns a non-basic type" do
34
- attr_details = {:member_type => "STRING" }
30
+
31
+ it 'returns a non-basic type' do
32
+ attr_details = { member_type: 'STRING' }
35
33
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(attr_details[:member_type].to_s.downcase).returns(false)
36
34
  result = helper.member_type_is_basic?(attr_details)
37
35
  result.should eq(attr_details[:member_type])
38
36
  end
39
-
40
37
  end
41
-
42
- context "primitive_type_is_basic?" do
43
-
44
- it "returns true" do
45
- attr_details = {:primitive => "STRING"}
38
+
39
+ context 'primitive_type_is_basic?' do
40
+ it 'returns true' do
41
+ attr_details = { primitive: 'STRING' }
46
42
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(attr_details[:primitive].to_s.downcase).returns(true)
47
43
  helper.primitive_type_is_basic?(attr_details).should eq(true)
48
44
  end
49
-
50
- it "returns false" do
51
- attr_details = {:primitive => "STRING"}
45
+
46
+ it 'returns false' do
47
+ attr_details = { primitive: 'STRING' }
52
48
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(attr_details[:primitive].to_s.downcase).returns(false)
53
49
  helper.primitive_type_is_basic?(attr_details).should eq(false)
54
50
  end
55
-
56
51
  end
57
-
58
- context "get_primitive_type_string" do
59
-
60
- ["NILCLASS", "nilclass"].each do |primitive|
61
- it "returns string in case of nilclass" do
62
- attr_details = {:primitive => primitive}
63
- helper.get_primitive_type_string(attr_details).should eq("string")
52
+
53
+ context 'get_primitive_type_string' do
54
+ %w(NILCLASS nilclass).each do |primitive|
55
+ it 'returns string in case of nilclass' do
56
+ attr_details = { primitive: primitive }
57
+ helper.get_primitive_type_string(attr_details).should eq('string')
64
58
  end
65
59
  end
66
-
67
- ["BLA", "bla"].each do |primitive|
68
- it "returns the primitive if not niclass" do
69
- attr_details = {:primitive => primitive}
60
+
61
+ %w(BLA bla).each do |primitive|
62
+ it 'returns the primitive if not niclass' do
63
+ attr_details = { primitive: primitive }
70
64
  helper.get_primitive_type_string(attr_details).should eq(primitive.to_s.downcase)
71
65
  end
72
66
  end
73
-
74
67
  end
75
-
76
- context "get_member_type_string" do
77
-
78
- ["Array", "array"].each do |primitive|
79
- it "checks the member type to be basic if primitive type array" do
80
- attr_details = {:primitive => primitive}
68
+
69
+ context 'get_member_type_string' do
70
+ %w(Array array).each do |primitive|
71
+ it 'checks the member type to be basic if primitive type array' do
72
+ attr_details = { primitive: primitive }
81
73
  helper.expects(:member_type_is_basic?).with(attr_details).returns(true)
82
74
  helper.get_member_type_string(attr_details).should eq(true)
83
75
  end
84
76
  end
85
-
86
-
87
- ["BLA", "Bla", "bla"].each do |primitive|
88
- it "returns the primitive type as it is if not array" do
89
- attr_details = {:primitive => primitive}
77
+
78
+ %w(BLA Bla bla).each do |primitive|
79
+ it 'returns the primitive type as it is if not array' do
80
+ attr_details = { primitive: primitive }
90
81
  helper.get_member_type_string(attr_details).should eq(primitive)
91
82
  end
92
83
  end
93
-
94
84
  end
95
-
96
- context "create_html_fault_model_element_type" do
97
- let(:pre) {[]}
98
- let(:attribute) {"some_attribute"}
99
-
85
+
86
+ context 'create_html_fault_model_element_type' do
87
+ let(:pre) { [] }
88
+ let(:attribute) { 'some_attribute' }
89
+
100
90
  before(:each) do
101
91
  helper.stubs(:primitive_type_is_basic?).returns(false)
102
92
  end
103
-
93
+
104
94
  def expect_type_string_elem_type(attr_details)
105
- type_string = "string"
95
+ type_string = 'string'
106
96
  helper.expects(:get_primitive_type_string).with(attr_details).returns(type_string)
107
- result =helper.create_html_fault_model_element_type(pre, attribute, attr_details)
108
- result.should eq([ "<span class='blue'>#{type_string}</span>&nbsp;<span class='bold'>#{attribute}</span>"])
97
+ result = helper.create_html_fault_model_element_type(pre, attribute, attr_details)
98
+ result.should eq(["<span class='blue'>#{type_string}</span>&nbsp;<span class='bold'>#{attribute}</span>"])
109
99
  end
110
-
111
- it "returns the string element if primitive type is nilclass" do
112
- attr_details = {:primitive => "nilclass"}
100
+
101
+ it 'returns the string element if primitive type is nilclass' do
102
+ attr_details = { primitive: 'nilclass' }
113
103
  expect_type_string_elem_type(attr_details)
114
104
  end
115
-
116
- ["NILCLASS", "Nilclass", "BLA"].each do |primitive|
117
- it "returns the string type is primitive is basic but not nilclass" do
118
- attr_details = {:primitive => primitive}
105
+
106
+ %w(NILCLASS Nilclass BLA).each do |primitive|
107
+ it 'returns the string type is primitive is basic but not nilclass' do
108
+ attr_details = { primitive: primitive }
119
109
  helper.expects(:primitive_type_is_basic?).with(attr_details).returns(true)
120
110
  expect_type_string_elem_type(attr_details)
121
111
  end
122
112
  end
123
113
 
124
- ["NILCLASS", "Nilclass", "BLA"].each do |primitive|
125
- it "returns the complex type if not basic and not nilclass" do
126
- attr_details = {:primitive => primitive}
127
- member_type = "SomeMemberType"
128
- expected= "Some expected string"
114
+ %w(NILCLASS Nilclass BLA).each do |primitive|
115
+ it 'returns the complex type if not basic and not nilclass' do
116
+ attr_details = { primitive: primitive }
117
+ member_type = 'SomeMemberType'
118
+ expected = 'Some expected string'
129
119
  helper.expects(:primitive_type_is_basic?).with(attr_details).returns(false)
130
120
  helper.expects(:get_member_type_string).with(attr_details).returns(member_type)
131
- helper.expects(:create_fault_model_complex_element_type).with(pre, member_type, attribute, true ).returns(expected)
132
- result =helper.create_html_fault_model_element_type(pre, attribute, attr_details)
121
+ helper.expects(:create_fault_model_complex_element_type).with(pre, member_type, attribute, true).returns(expected)
122
+ result = helper.create_html_fault_model_element_type(pre, attribute, attr_details)
133
123
  result.should eq(expected)
134
124
  end
135
125
  end
136
-
137
126
  end
138
-
139
127
  end
@@ -1,108 +1,97 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe WashoutBuilderMethodArgumentsHelper, :type => :helper do
4
- let!(:xml) { Builder::XmlMarkup.new}
5
-
6
- context "create_method_argument_element" do
7
- let(:spacer) { "&nbsp;&nbsp;&nbsp;&nbsp;"}
8
- let(:pre){[]}
9
- let(:param){ mock}
10
- let(:complex_class) {"SomeComplexClass"}
11
- let(:param_type) {"string"}
12
- let(:param_name) {"some_param_name"}
13
-
3
+ describe WashoutBuilderMethodArgumentsHelper, type: :helper do
4
+ let!(:xml) { Builder::XmlMarkup.new }
5
+
6
+ context 'create_method_argument_element' do
7
+ let(:spacer) { '&nbsp;&nbsp;&nbsp;&nbsp;' }
8
+ let(:pre) { [] }
9
+ let(:param) { mock }
10
+ let(:complex_class) { 'SomeComplexClass' }
11
+ let(:param_type) { 'string' }
12
+ let(:param_name) { 'some_param_name' }
13
+
14
14
  before(:each) do
15
- param.stubs(:get_complex_class_name).returns(complex_class)
15
+ param.stubs(:find_complex_class_name).returns(complex_class)
16
16
  param.stubs(:type).returns(param_type)
17
17
  param.stubs(:name).returns(param_name)
18
18
  end
19
-
19
+
20
20
  def expect_method_arg_basic_type(mlen)
21
- use_spacer = mlen > 1 ? true : false
22
- result = helper.create_method_argument_element( pre, param, mlen)
23
- result.should eq(["#{use_spacer ? spacer: ''}<span class='blue'>#{param.type}</span>&nbsp;<span class='bold'>#{param.name}</span>"])
21
+ use_spacer = mlen > 1 ? true : false
22
+ result = helper.create_method_argument_element(pre, param, mlen)
23
+ result.should eq(["#{use_spacer ? spacer : ''}<span class='blue'>#{param.type}</span>&nbsp;<span class='bold'>#{param.name}</span>"])
24
24
  end
25
-
26
- [0, 1 , 2, 3, 4].each do |mlen|
27
- it "returns a basic type" do
25
+
26
+ [0, 1, 2, 3, 4].each do |mlen|
27
+ it 'returns a basic type' do
28
28
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(param.type).returns(true)
29
- expect_method_arg_basic_type(mlen)
29
+ expect_method_arg_basic_type(mlen)
30
30
  end
31
31
  end
32
-
33
- [0, 1 , 2, 3, 4].each do |mlen|
34
- it "returns array of complex type" do
32
+
33
+ [0, 1, 2, 3, 4].each do |mlen|
34
+ it 'returns array of complex type' do
35
35
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(param.type).returns(false)
36
36
  param.expects(:multiplied).returns(true)
37
- use_spacer = mlen > 1 ? true : false
38
- result = helper.create_method_argument_element( pre, param, mlen)
39
- result.should eq( ["#{use_spacer ? spacer: ''}<a href='##{complex_class}'><span class='lightBlue'>Array of #{complex_class}</span></a>&nbsp;<span class='bold'>#{param.name}</span>"])
37
+ use_spacer = mlen > 1 ? true : false
38
+ result = helper.create_method_argument_element(pre, param, mlen)
39
+ result.should eq(["#{use_spacer ? spacer : ''}<a href='##{complex_class}'><span class='lightBlue'>Array of #{complex_class}</span></a>&nbsp;<span class='bold'>#{param.name}</span>"])
40
40
  end
41
41
  end
42
-
43
- [0, 1 , 2, 3, 4].each do |mlen|
44
- it "returns simple complex type" do
42
+
43
+ [0, 1, 2, 3, 4].each do |mlen|
44
+ it 'returns simple complex type' do
45
45
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(param.type).returns(false)
46
46
  param.expects(:multiplied).returns(false)
47
- use_spacer = mlen > 1 ? true : false
48
- result = helper.create_method_argument_element( pre, param, mlen)
49
- result.should eq( ["#{use_spacer ? spacer: ''}<a href='##{complex_class}'><span class='lightBlue'>#{complex_class}</span></a>&nbsp;<span class='bold'>#{param.name}</span>"])
47
+ use_spacer = mlen > 1 ? true : false
48
+ result = helper.create_method_argument_element(pre, param, mlen)
49
+ result.should eq(["#{use_spacer ? spacer : ''}<a href='##{complex_class}'><span class='lightBlue'>#{complex_class}</span></a>&nbsp;<span class='bold'>#{param.name}</span>"])
50
50
  end
51
51
  end
52
-
53
-
54
52
  end
55
-
56
- context "create_argument_element_spacer" do
57
-
58
- it "returns only the ) in bold " do
59
- result = helper.create_argument_element_spacer(xml, 0, 1)
53
+
54
+ context 'create_argument_element_spacer' do
55
+ it 'returns only the ) in bold ' do
56
+ helper.create_argument_element_spacer(xml, 0, 1)
60
57
  xml.target!.should eq("<span class=\"bold\">)</span>")
61
58
  end
62
-
63
- it "returns only the span with comma" do
64
- result = helper.create_argument_element_spacer(xml, -2, 1)
65
- xml.target!.should eq("<span>, </span>")
59
+
60
+ it 'returns only the span with comma' do
61
+ helper.create_argument_element_spacer(xml, -2, 1)
62
+ xml.target!.should eq('<span>, </span>')
66
63
  end
67
-
68
- it "returns only the span with comma and a break " do
69
- result = helper.create_argument_element_spacer(xml, 1, 3)
70
- xml.target!.should eq("<span>, </span><br/>")
64
+
65
+ it 'returns only the span with comma and a break ' do
66
+ helper.create_argument_element_spacer(xml, 1, 3)
67
+ xml.target!.should eq('<span>, </span><br/>')
71
68
  end
72
-
73
- it "returns a break and a ) sign " do
74
- result = helper.create_argument_element_spacer(xml, 2, 3)
69
+
70
+ it 'returns a break and a ) sign ' do
71
+ helper.create_argument_element_spacer(xml, 2, 3)
75
72
  xml.target!.should eq("<br/><span class=\"bold\">)</span>")
76
73
  end
77
-
74
+
78
75
  [3, 4, 4, 5, 6].each do |j_value|
79
- it "returns only the span with comma " do
80
- result = helper.create_argument_element_spacer(xml, j_value, 3)
81
- xml.target!.should eq("<br/>")
76
+ it 'returns only the span with comma ' do
77
+ helper.create_argument_element_spacer(xml, j_value, 3)
78
+ xml.target!.should eq('<br/>')
82
79
  end
83
80
  end
84
-
85
-
86
-
87
81
  end
88
-
89
- context "create_html_public_method_arguments" do
90
- let(:pre) {[]}
91
- let(:element) {mock}
92
- let(:second_element){mock}
93
-
94
- it "returns only the span with comma " do
95
- input = [element, second_element]
96
-
97
- helper.stubs(:create_method_argument_element).returns("bla")
98
- helper.stubs(:create_argument_element_spacer).returns("blabla")
99
- result = helper. create_html_public_method_arguments(xml, pre, input)
100
- xml.target!.should eq("<br/>")
101
- end
102
-
82
+
83
+ context 'create_html_public_method_arguments' do
84
+ let(:pre) { [] }
85
+ let(:element) { mock }
86
+ let(:second_element) { mock }
87
+
88
+ it 'returns only the span with comma ' do
89
+ input = [element, second_element]
90
+
91
+ helper.stubs(:create_method_argument_element).returns('bla')
92
+ helper.stubs(:create_argument_element_spacer).returns('blabla')
93
+ helper. create_html_public_method_arguments(xml, pre, input)
94
+ xml.target!.should eq('<br/>')
95
+ end
103
96
  end
104
-
105
-
106
-
107
-
108
97
  end