Permalink
Browse files

Fix tests.

  • Loading branch information...
josevalim committed Apr 25, 2011
1 parent 8d00dfc commit 2bc48561d54abaa09eeaa763f9017afb0c6ff87f
@@ -13,11 +13,13 @@ def app
directory "app"
template "#{app_templates_dir}/app/views/layouts/application.html.erb.tt",
"app/views/layouts/#{name}/application.html.erb"
+ empty_directory_with_gitkeep "app/assets/images"
elsif full?
empty_directory_with_gitkeep "app/models"
empty_directory_with_gitkeep "app/controllers"
empty_directory_with_gitkeep "app/views"
empty_directory_with_gitkeep "app/helpers"
+ empty_directory_with_gitkeep "app/assets/images"
end
end
@@ -135,12 +137,6 @@ def javascripts
end
end
- def images
- if mountable?
- empty_directory_with_gitkeep "app/assets/images"

This comment has been minimized.

Show comment Hide comment
@sikachu

sikachu Apr 26, 2011

Member

are you trying to mean 'delete this line'?

@sikachu

sikachu Apr 26, 2011

Member

are you trying to mean 'delete this line'?

- end
- end
-
def script(force = false)
directory "script", :force => force do |content|
"#{shebang}\n" + content
@@ -140,7 +140,7 @@ def test_ensure_that_tests_works_in_full_mode
run_generator [destination_root, "--full", "--skip_active_record"]
FileUtils.cd destination_root
`bundle install`
- assert_match(/2 tests, 2 assertions, 0 failures, 0 errors/, `bundle exec rake test`)
+ assert_match(/1 tests, 1 assertions, 0 failures, 0 errors/, `bundle exec rake test`)
end
def test_creating_engine_in_full_mode

4 comments on commit 2bc4856

@sikachu

This comment has been minimized.

Show comment Hide comment
@sikachu

sikachu Apr 25, 2011

Member

Oh ... is it OK to stick it in there? Do you have to remove the build(:images) as well?

Member

sikachu replied Apr 25, 2011

Oh ... is it OK to stick it in there? Do you have to remove the build(:images) as well?

@josevalim

This comment has been minimized.

Show comment Hide comment
@josevalim

josevalim Apr 25, 2011

Contributor

The test was not passing, so I assumed there wasn't a build(:images). If you can make it work with build(:images), send a pull request and I will merge it!

Contributor

josevalim replied Apr 25, 2011

The test was not passing, so I assumed there wasn't a build(:images). If you can make it work with build(:images), send a pull request and I will merge it!

@josevalim

This comment has been minimized.

Show comment Hide comment
@josevalim

josevalim Apr 25, 2011

Contributor

Also, there is a bunch of duplication between PluginNewGenerator and AppGenerator that could be moved to AppBase. If you want to tackle that, it would be awesome! <3 For example:

Maybe we could also move this stuff as they are common in both generators as well:

https://github.com/rails/rails/blob/2bc48561d54abaa09eeaa763f9017afb0c6ff87f/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb#L175-225

Contributor

josevalim replied Apr 25, 2011

Also, there is a bunch of duplication between PluginNewGenerator and AppGenerator that could be moved to AppBase. If you want to tackle that, it would be awesome! <3 For example:

Maybe we could also move this stuff as they are common in both generators as well:

https://github.com/rails/rails/blob/2bc48561d54abaa09eeaa763f9017afb0c6ff87f/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb#L175-225

@sikachu

This comment has been minimized.

Show comment Hide comment
@sikachu

sikachu Apr 25, 2011

Member
Member

sikachu replied Apr 25, 2011

Please sign in to comment.