page_object_wrapper 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -49,8 +49,7 @@ where required attributes are marked with (*)
49
49
  elements_set(:test_elements) do
50
50
  text_field(:tf) do
51
51
  locator :id => 'f1'
52
- missing_food 'some missing food'
53
- fresh_food 'some fresh food'
52
+ menu :user_defined, 'some food'
54
53
  end
55
54
 
56
55
  textarea(:ta) do
@@ -59,13 +58,13 @@ where required attributes are marked with (*)
59
58
 
60
59
  select(:s1) do
61
60
  locator :id => 'f10'
62
- fresh_food 'one'
63
- missing_food 'three'
61
+ menu :fresh_food, 'one'
62
+ menu :missing_food, 'three'
64
63
  end
65
64
 
66
65
  select(:s2) do
67
- locator :id => 'f11'
68
- fresh_food 'one'
66
+ locator "form(:action => 'http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi').select(:id => 'f11')"
67
+ menu :fresh_food, 'one'
69
68
  end
70
69
 
71
70
  checkbox(:cb){ locator :id => 'f5' }
@@ -152,6 +151,7 @@ Defined elements can be accessed with their labels.
152
151
  tp.tf # => Watir::TextField
153
152
  tp.rb # => Watir::Radio
154
153
  tp.test_elements # => Array of Watir elements
154
+ tp.table_with_header # => Watir::Table
155
155
 
156
156
 
157
157
 
@@ -179,17 +179,17 @@ current\_page
179
179
  tp = PageObjectWrapper.open_page(:some_test_page)
180
180
  tp.feed_test_elements(:missing_food)
181
181
 
182
- #### xxx\_fresh\_food, xxx\_missing\_food
182
+ #### xxx\_menu
183
183
  *parameters*
184
- no
184
+ :food\_type
185
185
  *returns*
186
- fresh or missinf food value from page definition
186
+ food value for this type which is defined in page\_object
187
187
 
188
188
  *preconditions*
189
189
  **tp** is a :some\_test\_page object opened in the browser
190
190
 
191
- tp.tf_fresh_food # => 'some fresh food'
192
- tp.ta_fresh_food # => 'default fresh food'
191
+ tp.tf_menu(:fresh_food) # => 'default fresh food'
192
+ tp.tf_menu(:user_defined) # => 'some food'
193
193
 
194
194
  #### fire\_xxx
195
195
  *parameters*
@@ -9,9 +9,11 @@ PageObjectWrapper.define_page('some_page_with_lost_of_errors') do
9
9
 
10
10
  elements_set(:bad_elements) do
11
11
  element('') do
12
+ menu :fresh_food, Array.new
12
13
  end
13
14
  element(:e) do
14
15
  locator ':e element locator'
16
+ menu 'a string', 'another string'
15
17
  end
16
18
  element(:e) do
17
19
  locator Hash.new
@@ -5,8 +5,8 @@ PageObjectWrapper.define_page(:another_test_page) do
5
5
  elements_set(:test_elements) do
6
6
  select(:s1) do
7
7
  locator :id => 'f10'
8
- fresh_food 'not in select list'
9
- missing_food 'not in select list'
8
+ menu :fresh_food, 'not in select list'
9
+ menu :missing_food, 'not in select list'
10
10
  end
11
11
  end
12
12
  end
@@ -5,8 +5,7 @@ PageObjectWrapper.define_page(:some_test_page) do
5
5
  elements_set(:test_elements) do
6
6
  text_field(:tf) do
7
7
  locator :id => 'f1'
8
- missing_food 'some missing food'
9
- fresh_food 'some fresh food'
8
+ menu :user_defined, 'some food'
10
9
  end
11
10
 
12
11
  textarea(:ta) do
@@ -15,13 +14,13 @@ PageObjectWrapper.define_page(:some_test_page) do
15
14
 
16
15
  select(:s1) do
17
16
  locator :id => 'f10'
18
- fresh_food 'one'
19
- missing_food 'three'
17
+ menu :fresh_food, 'one'
18
+ menu :missing_food, 'three'
20
19
  end
21
20
 
22
21
  select(:s2) do
23
- locator :id => 'f11'
24
- fresh_food 'one'
22
+ locator "form(:action => 'http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi').select(:id => 'f11')"
23
+ menu :fresh_food, 'one'
25
24
  end
26
25
 
27
26
  checkbox(:cb){ locator :id => 'f5' }
@@ -1,15 +1,18 @@
1
1
  require 'Dsl'
2
2
  class Element < DslElementWithLocator
3
3
  attr_reader :type
4
- dsl_attr_accessor :fresh_food, :missing_food
5
-
6
- DEFAULT_FRESH_FOOD = 'default fresh food'
7
- DEFAULT_MISSING_FOOD = 'default missing food'
8
4
 
9
5
  def initialize(label, type)
10
6
  super label
11
7
  @type = type
12
- @fresh_food = DEFAULT_FRESH_FOOD
13
- @missing_food = DEFAULT_MISSING_FOOD
8
+ @menu = { :fresh_food => 'default fresh food', :missing_food => 'default missing food' }
9
+ end
10
+
11
+ def menu food_type, value
12
+ @menu[food_type] = value
13
+ end
14
+
15
+ def menu_value
16
+ @menu
14
17
  end
15
18
  end
@@ -1,5 +1,5 @@
1
1
  module PageObjectWrapper
2
- class UnknownFoodType < StandardError; end
2
+ class UnknownMenuType < StandardError; end
3
3
  class UnableToFeedObject < StandardError; end
4
4
  class UnknownPageObject < StandardError; end
5
5
  class UnmappedPageObject < StandardError; end
@@ -19,7 +19,6 @@ class PageObject < DslElementWithLocator
19
19
  @@current_page = nil
20
20
 
21
21
  UNIQ_ELEMENT_WAIT_PERIOD = 10
22
- FOOD_TYPES = [:missing_food, :fresh_food]
23
22
  FEED_ALL = Regexp.new(/^feed_all$/)
24
23
  FEED_SET = Regexp.new(/^feed_([\w_]+)$/)
25
24
  FIRE_ACTION = Regexp.new(/^fire_([\w_]+)$/)
@@ -188,11 +187,8 @@ class PageObject < DslElementWithLocator
188
187
  eset.instance_eval(&block)
189
188
  @esets << eset
190
189
  eset.elements.each{|e|
191
- PageObject.send :define_method, (e.label_value.to_s+'_fresh_food').to_sym do
192
- e.fresh_food_value
193
- end
194
- PageObject.send :define_method, (e.label_value.to_s+'_missing_food').to_sym do
195
- e.missing_food_value
190
+ PageObject.send :define_method, (e.label_value.to_s+'_menu').to_sym do |food_type|
191
+ e.menu_value[food_type].to_s
196
192
  end
197
193
  }
198
194
  @elements += eset.elements
@@ -250,7 +246,8 @@ class PageObject < DslElementWithLocator
250
246
  element_output = []
251
247
  element_output << "\t\telement #{e.label_value.inspect} already defined\n" if labeled(eset.elements).count(e.label_value) > 1
252
248
  element_output << "\t\tlabel #{e.label_value.inspect} not a Symbol\n" if not e.label_value.is_a?(Symbol)
253
- element_output << "\t\tlocator #{e.locator_value.inspect} not a meaningful Hash\n" if not e.locator_value.is_a?(Hash) or e.locator_value.empty?
249
+ element_output << "\t\tlocator #{e.locator_value.inspect} not a meaningful Hash or String\n" if (not e.locator_value.is_a?(Hash) and not e.locator_value.is_a?(String)) or e.locator_value.empty?
250
+ element_output << "\t\tmenu #{e.menu_value.inspect} not properly defined (must be {:food_type => 'a string'})\n" if (e.menu_value.keys.collect(&:class).uniq! != [Symbol]) or (e.menu_value.values.collect(&:class).uniq! != [String])
254
251
  element_output.unshift "\telement(#{e.label_value.inspect}):\n" if not element_output.empty?
255
252
  output += element_output
256
253
  }
@@ -311,20 +308,28 @@ private
311
308
  end
312
309
 
313
310
  def return_watir_element(e)
314
- @@browser.send e.type, e.locator_value
311
+ el = nil
312
+ if e.locator_value.is_a? Hash
313
+ el = @@browser.send e.type, e.locator_value
314
+ elsif e.locator_value.is_a? String
315
+ el = @@browser.instance_eval e.locator_value
316
+ end
317
+ el
315
318
  end
316
319
 
317
320
  def return_array_of_watir_elements(eset)
318
- eset.elements.collect{|e| @@browser.send(e.type, e.locator_value)}
321
+ eset.elements.collect{|e| return_watir_element(e)}
319
322
  end
320
323
 
321
- def feed_elements(elements, food_type=nil)
324
+ def feed_elements(elements, menu_type=nil)
322
325
  raise PageObjectWrapper::BrowserNotFound if @@browser.nil? or not @@browser.exist?
323
- food_type ||= :fresh_food
324
- raise PageObjectWrapper::UnknownFoodType, food_type.inspect if not FOOD_TYPES.include?(food_type)
326
+ menu_type ||= :fresh_food
327
+ known_types = []
328
+ elements.each{ |e| known_types += e.menu_value.keys }
329
+ raise PageObjectWrapper::UnknownMenuType, menu_type.inspect if not known_types.include?(menu_type)
325
330
  elements.each{|e|
326
- food = e.send (food_type.to_s+'_value').to_sym
327
- watir_element = @@browser.send e.type, e.locator_value
331
+ food = e.menu_value[menu_type].to_s
332
+ watir_element = return_watir_element(e)
328
333
  case watir_element
329
334
  when Watir::CheckBox
330
335
  watir_element.when_present.set
@@ -334,12 +339,8 @@ private
334
339
  begin
335
340
  watir_element.when_present.select food
336
341
  rescue Watir::Exception::NoValueFoundException => e
337
- if food_type == :missing_food
338
- # proceed to next element if missing_food is not found in select list
339
- next
340
- else
341
- raise e
342
- end
342
+ # proceed to next element if missing_food is not found in select list
343
+ next
343
344
  end
344
345
  else
345
346
  if watir_element.respond_to?(:set)
@@ -1,3 +1,3 @@
1
1
  module PageObjectWrapper
2
- VERSION = "1.3.2"
2
+ VERSION = "1.3.3"
3
3
  end
@@ -31,6 +31,8 @@ describe "define_page_object" do
31
31
 
32
32
  specify { subject.elements.collect(&:label_value).should include(:tf)}
33
33
  it { should respond_to(:tf) }
34
+ it { should respond_to(:tf_menu) }
35
+ it { should respond_to(:ta_menu) }
34
36
 
35
37
  specify { subject.actions.collect(&:label_value).should include(:press_cool_button)}
36
38
  it { should respond_to(:fire_press_cool_button) }
@@ -72,21 +74,22 @@ describe "define_page_object" do
72
74
  its(:locator_value) { should be_a Hash }
73
75
  end
74
76
 
75
- describe "element food" do
76
- it { should respond_to(:fresh_food) }
77
- it { should respond_to(:fresh_food_value) }
78
- it { should respond_to(:missing_food) }
79
- it { should respond_to(:missing_food_value) }
77
+ describe "element menu" do
78
+ it { should respond_to(:menu) }
79
+ it { should respond_to(:menu_value) }
80
80
 
81
- its(:fresh_food_value) { should be_a String}
82
- its(:missing_food_value) { should be_a String}
81
+ its(:menu_value) { should be_a Hash}
83
82
 
84
- describe "food default values" do
85
- its(:fresh_food_value){ should eq('some fresh food') }
83
+ describe "default menu" do
84
+ its(:menu_value){ should have_key(:fresh_food) }
85
+ its(:menu_value){ should have_value 'default fresh food'}
86
+ its(:menu_value){ should have_key(:missing_food) }
87
+ its(:menu_value){ should have_value 'default missing food'}
86
88
  end
87
89
 
88
- describe "food user defined values" do
89
- its(:missing_food_value){ should eq('some missing food') }
90
+ describe "user defined menu" do
91
+ its(:menu_value){ should have_key :user_defined }
92
+ its(:menu_value){ should have_value 'some food'}
90
93
  end
91
94
  end
92
95
  end
File without changes
@@ -32,7 +32,7 @@ describe "page_object.feed_xxx" do
32
32
  it "populates all xxx elements with :fresh_food" do
33
33
  tp = PageObjectWrapper.current_page
34
34
  tp.feed_test_elements(:fresh_food)
35
- @b.text_field(:id=>'f1').value.should eq 'some fresh food'
35
+ @b.text_field(:id=>'f1').value.should eq 'default fresh food'
36
36
  @b.textarea(:id=>'f2').value.should eq 'default fresh food'
37
37
  @b.select(:id=>'f10').value.should eq "one"
38
38
  @b.select(:id=>'f11').value.should eq "one"
@@ -41,11 +41,24 @@ describe "page_object.feed_xxx" do
41
41
  end
42
42
  end
43
43
 
44
+ context "argument = :user_defined" do
45
+ it "populates all xxx elements with :user_defined" do
46
+ tp = PageObjectWrapper.open_page(:some_test_page)
47
+ tp.feed_test_elements(:user_defined)
48
+ @b.text_field(:id=>'f1').value.should eq 'some food'
49
+ @b.textarea(:id=>'f2').value.should eq ''
50
+ @b.select(:id=>'f10').value.should eq "two (default)"
51
+ @b.select(:id=>'f11').value.should eq "two (default)"
52
+ @b.checkbox(:id=>'f5').should be_set
53
+ @b.radio(:id=>'f3').should be_set
54
+ end
55
+ end
56
+
44
57
  context "argument = nil" do
45
58
  it "populates all xxx elements with :fresh_food" do
46
59
  tp = PageObjectWrapper.current_page
47
60
  tp.feed_test_elements
48
- @b.text_field(:id=>'f1').value.should eq 'some fresh food'
61
+ @b.text_field(:id=>'f1').value.should eq 'default fresh food'
49
62
  @b.textarea(:id=>'f2').value.should eq 'default fresh food'
50
63
  @b.select(:id=>'f10').value.should eq "one"
51
64
  @b.select(:id=>'f11').value.should eq "one"
@@ -58,7 +71,7 @@ describe "page_object.feed_xxx" do
58
71
  it "populates all xxx elements with :missing_food" do
59
72
  tp = PageObjectWrapper.open_page(:some_test_page)
60
73
  tp.feed_test_elements(:missing_food)
61
- @b.text_field(:id=>'f1').value.should eq 'some missing food'
74
+ @b.text_field(:id=>'f1').value.should eq 'default missing food'
62
75
  @b.textarea(:id=>'f2').value.should eq 'default missing food'
63
76
  @b.select(:id=>'f10').value.should eq "three"
64
77
  @b.select(:id=>'f11').value.should eq "two (default)"
@@ -67,13 +80,7 @@ describe "page_object.feed_xxx" do
67
80
  end
68
81
  end
69
82
 
70
- context "fresh food is not found in select list" do
71
- it "raises Watir Watir::Exception::NoValueFoundException" do
72
- atp = PageObjectWrapper.open_page(:another_test_page)
73
- expect{atp.feed_test_elements}.to raise_error(Watir::Exception::NoValueFoundException)
74
- end
75
- end
76
- context "missing food is not found in select list" do
83
+ context "food not found in select list" do
77
84
  it "continues execution" do
78
85
  atp = PageObjectWrapper.current_page
79
86
  atp.feed_test_elements(:missing_food).should eq(atp)
@@ -10,7 +10,9 @@ describe "PageObjectWrapper.load" do
10
10
  begin
11
11
  PageObjectWrapper.load(File.dirname(__FILE__)+'/../bad_pages')
12
12
  rescue Exception => e
13
+ #puts '=============='
13
14
  #puts e.message
15
+ #puts '=============='
14
16
  e.should be_a(PageObjectWrapper::Load)
15
17
  e.message.should == 'page_object("some_page_with_lost_of_errors"):
16
18
  label "some_page_with_lost_of_errors" not a Symbol
@@ -19,13 +21,14 @@ elements_set("some elements_set label"):
19
21
  label "some elements_set label" not a Symbol
20
22
  element(""):
21
23
  label "" not a Symbol
22
- locator nil not a meaningful Hash
24
+ locator nil not a meaningful Hash or String
25
+ menu {:fresh_food=>[], :missing_food=>"default missing food"} not properly defined (must be {:food_type => \'a string\'})
23
26
  element(:e):
24
27
  element :e already defined
25
- locator ":e element locator" not a meaningful Hash
28
+ menu {:fresh_food=>"default fresh food", :missing_food=>"default missing food", "a string"=>"another string"} not properly defined (must be {:food_type => \'a string\'})
26
29
  element(:e):
27
30
  element :e already defined
28
- locator {} not a meaningful Hash
31
+ locator {} not a meaningful Hash or String
29
32
  action(""):
30
33
  label "" not a Symbol
31
34
  next_page nil not a Symbol
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ describe "getting food specified for element" do
3
+ subject{ PageObjectWrapper.receive_page(:some_test_page) }
4
+
5
+ describe "page_object.xxx_menu(:food_type)" do
6
+ it "raises NoMethodError if xxx is not known element" do
7
+ expect{ subject.unknown_menu }.to raise_error(NoMethodError)
8
+ end
9
+
10
+ it{ should respond_to(:tf_menu) }
11
+
12
+ it "tf_menu(:fresh_food)" do
13
+ subject.tf_menu(:fresh_food).should eq 'default fresh food'
14
+ end
15
+ it "tf_menu(:missing_food)" do
16
+ subject.tf_menu(:missing_food).should eq 'default missing food'
17
+ end
18
+ it "tf_menu(:user_defined)" do
19
+ subject.tf_menu(:user_defined).should eq 'some food'
20
+ end
21
+ it "tf_menu(:unknown_food)" do
22
+ subject.tf_menu(:unknown_food).should eq ''
23
+ end
24
+ it "tf_menu('unknown_food')" do
25
+ subject.tf_menu(:unknown_food).should eq ''
26
+ end
27
+
28
+ end
29
+ end
File without changes
File without changes
@@ -56,8 +56,8 @@ describe "page_object.select_from_xxx" do
56
56
  context "next_page not specified" do
57
57
  it "returns last row value from provided column" do
58
58
  tp.select_from_table_without_header(:column_0).text.should eq 'Iceland'
59
- tp.select_from_table_without_header(:column_1).text.should eq '449,964'
60
- tp.select_from_table_without_header(:column_2).text.should eq '410,928'
59
+ tp.select_from_table_without_header(:column_1).text.should eq '103,000'
60
+ tp.select_from_table_without_header(:column_2).text.should eq '100,250'
61
61
  end
62
62
  end
63
63
  context "next_page specified" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_object_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: watir-webdriver
16
- requirement: &17123400 !ruby/object:Gem::Requirement
16
+ requirement: &7037740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17123400
24
+ version_requirements: *7037740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &17125340 !ruby/object:Gem::Requirement
27
+ requirement: &6983320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *17125340
35
+ version_requirements: *6983320
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &17127900 !ruby/object:Gem::Requirement
38
+ requirement: &6929080 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *17127900
46
+ version_requirements: *6929080
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: debugger
49
- requirement: &17032940 !ruby/object:Gem::Requirement
49
+ requirement: &6900840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *17032940
57
+ version_requirements: *6900840
58
58
  description: Wraps watir-webdriver with convenient testing interface, based on PageObjects
59
59
  automation testing pattern. Simplifies resulting automated test understanding.
60
60
  email:
@@ -93,17 +93,18 @@ files:
93
93
  - page_object_wrapper.gemspec
94
94
  - page_object_wrapper.gemspec.orig
95
95
  - spec/define_page_object_spec.rb
96
- - spec/defined_elements_spec.rb
97
- - spec/each_page.rb
98
- - spec/feed_elements_spec.rb
99
- - spec/fire_event_and_validate_spec.rb
96
+ - spec/each_xxx.rb
97
+ - spec/feed_xxx_spec.rb
98
+ - spec/fire_xxx_and_validate_xxx_spec.rb
100
99
  - spec/generate_spec.rb
101
- - spec/get_food_spec.rb
102
100
  - spec/load_spec.rb
103
- - spec/open_spec.rb
104
- - spec/select_from_spec.rb
101
+ - spec/menu_xxx_spec.rb
102
+ - spec/open_page_spec.rb
103
+ - spec/open_xxx.rb
104
+ - spec/select_from_xxx_spec.rb
105
105
  - spec/shared_examples.rb
106
106
  - spec/spec_helper.rb
107
+ - spec/xxx_spec.rb
107
108
  homepage: https://github.com/evgeniy-khatko/page_object_wrapper
108
109
  licenses: []
109
110
  post_install_message:
@@ -131,14 +132,15 @@ specification_version: 3
131
132
  summary: Wraps watir-webdriver with convenient testing interface.
132
133
  test_files:
133
134
  - spec/define_page_object_spec.rb
134
- - spec/defined_elements_spec.rb
135
- - spec/each_page.rb
136
- - spec/feed_elements_spec.rb
137
- - spec/fire_event_and_validate_spec.rb
135
+ - spec/each_xxx.rb
136
+ - spec/feed_xxx_spec.rb
137
+ - spec/fire_xxx_and_validate_xxx_spec.rb
138
138
  - spec/generate_spec.rb
139
- - spec/get_food_spec.rb
140
139
  - spec/load_spec.rb
141
- - spec/open_spec.rb
142
- - spec/select_from_spec.rb
140
+ - spec/menu_xxx_spec.rb
141
+ - spec/open_page_spec.rb
142
+ - spec/open_xxx.rb
143
+ - spec/select_from_xxx_spec.rb
143
144
  - spec/shared_examples.rb
144
145
  - spec/spec_helper.rb
146
+ - spec/xxx_spec.rb
@@ -1,28 +0,0 @@
1
- require 'spec_helper'
2
- describe "getting food specified for element" do
3
- subject{ PageObjectWrapper.receive_page(:some_test_page) }
4
-
5
- describe "page_object.xxx_fresh_food" do
6
- it "raises NoMethodError if xxx is not known element" do
7
- expect{ subject.unknown_fresh_food }.to raise_error(NoMethodError)
8
- end
9
-
10
- it{ should respond_to(:tf_fresh_food) }
11
- its(:tf_fresh_food){ should eq 'some fresh food' }
12
-
13
- it{ should respond_to(:ta_fresh_food) }
14
- its(:ta_fresh_food){ should eq 'default fresh food' }
15
- end
16
-
17
- describe "page_object.xxx_missing_food" do
18
- it "raises NoMethodError if xxx is not known element" do
19
- expect{ subject.unknown_fresh_food }.to raise_error(NoMethodError)
20
- end
21
-
22
- it{ should respond_to(:tf_fresh_food) }
23
- its(:tf_missing_food){ should eq 'some missing food' }
24
-
25
- it{ should respond_to(:ta_fresh_food) }
26
- its(:ta_missing_food){ should eq 'default missing food' }
27
- end
28
- end