1
- require File . join ( File . dirname ( __FILE__ ) , "generators_test_helper.rb" )
1
+ require File . expand_path ( "../generators_test_helper" , __FILE__ )
2
2
3
3
class ViewsGeneratorTest < Rails ::Generators ::TestCase
4
4
tests Devise ::Generators ::ViewsGenerator
5
- destination File . expand_path ( "../tmp" , File . dirname ( __FILE__ ) )
5
+ destination File . expand_path ( "../../ tmp" , __FILE__ )
6
6
setup :prepare_destination
7
7
8
8
test "Assert all views are properly created with no params" do
@@ -20,18 +20,16 @@ class ViewsGeneratorTest < Rails::Generators::TestCase
20
20
21
21
def assert_files ( scope = nil , template_engine = nil )
22
22
scope = "devise" if scope . nil?
23
- assert_file "app/views/#{ scope } /confirmations/new.html.erb"
24
- assert_file "app/views/#{ scope } /mailer/confirmation_instructions.html.erb"
25
- assert_file "app/views/#{ scope } /mailer/reset_password_instructions.html.erb"
26
- assert_file "app/views/#{ scope } /mailer/unlock_instructions.html.erb"
27
- assert_file "app/views/#{ scope } /passwords/edit.html.erb"
28
- assert_file "app/views/#{ scope } /passwords/new.html.erb"
29
- assert_file "app/views/#{ scope } /registrations/new.html.erb"
30
- assert_file "app/views/#{ scope } /registrations/edit.html.erb"
31
- assert_file "app/views/#{ scope } /sessions/new.html.erb"
32
- assert_file "app/views/#{ scope } /shared/_links.erb"
33
- assert_file "app/views/#{ scope } /unlocks/new.html.erb"
34
-
23
+ assert_file "app/views/#{ scope } /confirmations/new.html.erb"
24
+ assert_file "app/views/#{ scope } /mailer/confirmation_instructions.html.erb"
25
+ assert_file "app/views/#{ scope } /mailer/reset_password_instructions.html.erb"
26
+ assert_file "app/views/#{ scope } /mailer/unlock_instructions.html.erb"
27
+ assert_file "app/views/#{ scope } /passwords/edit.html.erb"
28
+ assert_file "app/views/#{ scope } /passwords/new.html.erb"
29
+ assert_file "app/views/#{ scope } /registrations/new.html.erb"
30
+ assert_file "app/views/#{ scope } /registrations/edit.html.erb"
31
+ assert_file "app/views/#{ scope } /sessions/new.html.erb"
32
+ assert_file "app/views/#{ scope } /shared/_links.erb"
33
+ assert_file "app/views/#{ scope } /unlocks/new.html.erb"
35
34
end
36
-
37
35
end
0 commit comments