Sha256: 39b1e98bc6fa2e3dba355d69546b34226931955b90cb754fa9f9cd24d2223709

Contents?: true

Size: 1001 Bytes

Versions: 1

Compression:

Stored size: 1001 Bytes

Contents

require 'test_helper'
require 'performance_test_help'

class <%= controller_class_name %>PerformanceTest < ActionController::PerformanceTest  
  def test_listing_<%= file_name %>
    get '/<%= controller_collection_path.gsub('_', '/') %>'
  end
  
  def test_adding_<%= file_name %>
    get '/<%= controller_collection_path.gsub('_', '/') %>/new'
  end
  
  def test_creating_<%= file_name %>
    post '/<%= controller_collection_path.gsub('_', '/') %>', :<%= controller_singular_name %> => Factory.attributes_for(:<%= controller_singular_name %>)
  end
  
  def test_showing_<%= file_name %>
    get '/<%= controller_collection_path.gsub('_', '/') %>/1'
  end
  
  def test_editing_<%= file_name %>
    get '/<%= controller_collection_path.gsub('_', '/') %>/1/edit'
  end
  
  def test_updating_<%= file_name %>
    put '/<%= controller_collection_path.gsub('_', '/') %>/1'
  end
  
  def test_destroying_<%= file_name %>
    delete '/<%= controller_collection_path.gsub('_', '/') %>/1'
  end    
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sob-shoulda_generator-0.2.1 rails_generators/shoulda_scaffold/templates/performance_test/browser_test.rb