File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 152
152
end
153
153
end
154
154
end
155
+
156
+ describe 'rails g annotate:install' do
157
+ let ( :command ) { 'bin/rails g annotate:install' }
158
+ let ( :rake_file_path ) { 'lib/tasks/auto_annotate_models.rake' }
159
+
160
+ it 'generates the rake file' do
161
+ Bundler . with_clean_env do
162
+ Dir . chdir RAILS_5_2_APP_PATH do
163
+ full_path = File . expand_path ( rake_file_path )
164
+ expect { `#{ command } ` } . to change { File . exist? ( rake_file_path ) } . from ( false ) . to ( true )
165
+
166
+ File . delete ( full_path )
167
+ end
168
+ end
169
+ end
170
+ end
155
171
end
Original file line number Diff line number Diff line change 167
167
end
168
168
end
169
169
end
170
+
171
+ describe 'rails g annotate:install' do
172
+ let ( :command ) { 'bin/rails g annotate:install' }
173
+ let ( :rake_file_path ) { 'lib/tasks/auto_annotate_models.rake' }
174
+
175
+ it 'generates the rake file' do
176
+ Bundler . with_clean_env do
177
+ Dir . chdir RAILS_6_0_APP_PATH do
178
+ full_path = File . expand_path ( rake_file_path )
179
+ expect { `#{ command } ` } . to change { File . exist? ( rake_file_path ) } . from ( false ) . to ( true )
180
+
181
+ File . delete ( full_path )
182
+ end
183
+ end
184
+ end
185
+ end
170
186
end
You can’t perform that action at this time.
0 commit comments