|
101 | 101 | end
|
102 | 102 | end
|
103 | 103 | end
|
104 |
| - context 'ignorexib option set to false' do |
| 104 | + context 'ignore-xib-files option set to false' do |
105 | 105 | before :each do
|
106 | 106 | @fixtures_dir = File.expand_path(File.join(__FILE__, '../../fixtures/nibself'))
|
107 | 107 | end
|
|
112 | 112 | end
|
113 | 113 | end
|
114 | 114 | end
|
115 |
| - context 'ignorexib option set to true' do |
| 115 | + context 'ignore-xib-files option set to true' do |
116 | 116 | before :each do
|
117 | 117 | @fixtures_dir = File.expand_path(File.join(__FILE__, '../../fixtures/nibself'))
|
118 | 118 | end
|
119 | 119 | describe '#unsed_references' do
|
120 | 120 | it 'finds one unused references' do
|
121 |
| - finder = Fui::Finder.new(@fixtures_dir, 'ignorexib' => true) |
| 121 | + finder = Fui::Finder.new(@fixtures_dir, 'ignore-xib-files' => true) |
122 | 122 | expect(finder.unused_references.count).to eq(1)
|
123 | 123 | end
|
124 | 124 | end
|
125 | 125 | end
|
| 126 | + context 'ignore global imports option set to true' do |
| 127 | + before :each do |
| 128 | + @fixtures_dir = File.expand_path(File.join(__FILE__, '../../fixtures/global_import')) |
| 129 | + end |
| 130 | + describe '#unused_references' do |
| 131 | + it 'finds one unused global reference' do |
| 132 | + finder = Fui::Finder.new(@fixtures_dir, 'ignore-global-imports' => false) |
| 133 | + expect(Hash[finder.unused_references.map { |k, v| [k.filename, v.count] }]).to eq('header.h' => 0, 'unused_class.h' => 0) |
| 134 | + end |
| 135 | + end |
| 136 | + end |
| 137 | + context 'ignore global imports option set to false' do |
| 138 | + before :each do |
| 139 | + @fixtures_dir = File.expand_path(File.join(__FILE__, '../../fixtures/global_import')) |
| 140 | + end |
| 141 | + describe '#unused_references' do |
| 142 | + it 'finds no unused global references' do |
| 143 | + finder = Fui::Finder.new(@fixtures_dir, 'ignore-global-imports' => true) |
| 144 | + expect(Hash[finder.unused_references.map { |k, v| [k.filename, v.count] }]).to eq('header.h' => 0, 'unused_class.h' => 0, 'used_class.h' => 0) |
| 145 | + end |
| 146 | + end |
| 147 | + end |
126 | 148 | end
|
0 commit comments