File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
lib/ajax-datatables-rails
spec/ajax-datatables-rails Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
module AjaxDatatablesRails
2
- class NotImplemented < StandardError ; end
3
-
4
2
class Base
5
3
extend Forwardable
6
4
@@ -24,15 +22,15 @@ def datatable
24
22
end
25
23
26
24
def view_columns
27
- fail ( NotImplemented , view_columns_error_text )
25
+ fail ( NotImplementedError , view_columns_error_text )
28
26
end
29
27
30
28
def get_raw_records
31
- fail ( NotImplemented , raw_records_error_text )
29
+ fail ( NotImplementedError , raw_records_error_text )
32
30
end
33
31
34
32
def data
35
- fail ( NotImplemented , data_error_text )
33
+ fail ( NotImplementedError , data_error_text )
36
34
end
37
35
38
36
def additional_datas
Original file line number Diff line number Diff line change 21
21
describe '#view_columns' do
22
22
it 'raises an error if not defined by the user' do
23
23
datatable = described_class . new ( view )
24
- expect { datatable . view_columns } . to raise_error AjaxDatatablesRails :: NotImplemented
24
+ expect { datatable . view_columns } . to raise_error NotImplementedError
25
25
end
26
26
27
27
context 'child class implements view_columns' do
35
35
describe '#get_raw_records' do
36
36
it 'raises an error if not defined by the user' do
37
37
datatable = described_class . new ( view )
38
- expect { datatable . get_raw_records } . to raise_error AjaxDatatablesRails :: NotImplemented
38
+ expect { datatable . get_raw_records } . to raise_error NotImplementedError
39
39
end
40
40
end
41
41
42
42
describe '#data' do
43
43
it 'raises an error if not defined by the user' do
44
44
datatable = described_class . new ( view )
45
- expect { datatable . data } . to raise_error AjaxDatatablesRails :: NotImplemented
45
+ expect { datatable . data } . to raise_error NotImplementedError
46
46
end
47
47
48
48
context 'when data is defined as a hash' do
You can’t perform that action at this time.
0 commit comments