how to use rails g command in rails 3.1 engine path

I use rails3.1 edge. i run rails g model post title:string
body:text ,
      invoke active_record
      create db/migrate/20110710035713_create_posts.rb
      create app/models/post.rb
      invoke test_unit
      create test/unit/post_test.rb
      create test/fixtures/posts.yml

but this files were created in test/dummy path,how can i use the
rails g command to create files in engine path