diff options
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 63bb4ce32f..f2a74ea647 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -67,10 +67,10 @@ module ActionView # # In particular, thanks to the conventions followed in the generated field names, the # controller gets a nested hash <tt>params[:person]</tt> with the person attributes - # set in the form. That hash is ready to be passed to <tt>Person.create</tt>: + # set in the form. That hash is ready to be passed to <tt>Person.new</tt>: # - # @person = Person.create(params[:person]) - # if @person.valid? + # @person = Person.new(params[:person]) + # if @person.save # # success # else # # error handling diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index 6700d90a33..5573fa6904 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -1,4 +1,3 @@ -require "ostruct" require "optparse" require "rake/file_list" require "method_source" @@ -14,7 +13,7 @@ module Rails opts.separator "" opts.on("-e", "--environment [ENV]", - "run tests in the ENV environment") do |env| + "Run tests in the ENV environment") do |env| options[:environment] = env.strip end opts.separator "" @@ -40,7 +39,7 @@ module Rails opts.separator "Output options:" opts.on("-b", "--backtrace", - "show the complte backtrace") do + "Show the complete backtrace") do options[:backtrace] = true end @@ -63,7 +62,7 @@ module Rails options[:line] &&= options[:line].to_i else arg = arg.gsub(':', '') - if Dir.exists?("#{arg}") + if Dir.exist?("#{arg}") options[:patterns] << File.expand_path("#{arg}/**/*_test.rb") elsif File.file?(arg) options[:patterns] << File.expand_path(arg) |