spec/support/controller_builder.rb in shoulda-matchers-1.5.6 vs spec/support/controller_builder.rb in shoulda-matchers-2.0.0
- old
+ new
@@ -62,33 +62,9 @@
full_path = File.join(TMP_VIEW_PATH, path)
FileUtils.mkdir_p(File.dirname(full_path))
File.open(full_path, 'w') { |file| file.write(contents) }
end
- def controller_for_resource_with_strong_parameters(&block)
- define_model "User"
- controller_class = define_controller "Users" do
- def new
- @user = User.new
- render :nothing => true
- end
-
- def create
- @user = User.create(user_params)
- render :nothing => true
- end
-
- private
- define_method :user_params, &block
- end
-
- setup_rails_controller_test(controller_class)
-
- define_routes { resources :users }
-
- controller_class
- end
-
private
def delete_temporary_views
FileUtils.rm_rf(TMP_VIEW_PATH)
end