|
17 | 17 |
|
18 | 18 | describe 'User API' do
|
19 | 19 | describe '#view_columns' do
|
20 |
| - it 'raises an error if not defined by the user' do |
21 |
| - datatable = described_class.new(sample_params) |
22 |
| - expect { datatable.view_columns }.to raise_error NotImplementedError |
| 20 | + context 'when method is not defined by the user' do |
| 21 | + it 'raises an error' do |
| 22 | + datatable = described_class.new(sample_params) |
| 23 | + expect { datatable.view_columns }.to raise_error NotImplementedError |
| 24 | + end |
23 | 25 | end
|
24 | 26 |
|
25 | 27 | context 'child class implements view_columns' do
|
|
31 | 33 | end
|
32 | 34 |
|
33 | 35 | describe '#get_raw_records' do
|
34 |
| - it 'raises an error if not defined by the user' do |
35 |
| - datatable = described_class.new(sample_params) |
36 |
| - expect { datatable.get_raw_records }.to raise_error NotImplementedError |
| 36 | + context 'when method is not defined by the user' do |
| 37 | + it 'raises an error' do |
| 38 | + datatable = described_class.new(sample_params) |
| 39 | + expect { datatable.get_raw_records }.to raise_error NotImplementedError |
| 40 | + end |
37 | 41 | end
|
38 | 42 | end
|
39 | 43 |
|
40 | 44 | describe '#data' do
|
41 |
| - it 'raises an error if not defined by the user' do |
42 |
| - datatable = described_class.new(sample_params) |
43 |
| - expect { datatable.data }.to raise_error NotImplementedError |
| 45 | + context 'when method is not defined by the user' do |
| 46 | + it 'raises an error' do |
| 47 | + datatable = described_class.new(sample_params) |
| 48 | + expect { datatable.data }.to raise_error NotImplementedError |
| 49 | + end |
44 | 50 | end
|
45 | 51 |
|
46 | 52 | context 'when data is defined as a hash' do
|
|
0 commit comments