spec/unit/tables/table_screen_spec.rb in ProMotion-1.0.1 vs spec/unit/tables/table_screen_spec.rb in ProMotion-1.0.2
- old
+ new
@@ -93,6 +93,23 @@
# Animations cause the refresh object to fail when tested. Test manually.
end
+ describe 'test PM::TableScreen\'s method call order' do
+ before do
+ class MethodCallOrderTestTableScreen < PM::TableScreen
+ def table_data; @table_data ||= []; end
+ def on_load
+ @table_data = [{cells: [ title: 'cell 1' ]}]
+ update_table_data
+ end
+ end
+ end
+
+ it 'should not raise error at load view' do
+ proc { @screen = MethodCallOrderTestTableScreen.new }.should.not.raise(NoMethodError)
+ end
+ end
+
end
+