paper_trail_manager 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -7
- data/.travis.yml +9 -4
- data/Appraisals +15 -0
- data/CHANGES.md +5 -0
- data/Gemfile +3 -26
- data/README.md +6 -1
- data/Rakefile +8 -31
- data/app/controllers/paper_trail_manager/changes_controller.rb +3 -3
- data/app/helpers/paper_trail_manager/changes_helper.rb +1 -1
- data/app/views/paper_trail_manager/changes/_version.html.erb +1 -1
- data/gemfiles/rails_3.2.gemfile +7 -0
- data/gemfiles/rails_4.0.gemfile +7 -0
- data/gemfiles/rails_4.1.gemfile +7 -0
- data/gemfiles/rails_4.2.gemfile +7 -0
- data/lib/paper_trail_manager.rb +1 -0
- data/paper_trail_manager.gemspec +27 -381
- data/{rails_test/common/spec → spec}/controllers/entities_controller_spec.rb +1 -1
- data/{rails_test/common/spec → spec}/controllers/platforms_controller_spec.rb +1 -1
- data/{rails_test/rails-3.1.8 → spec/dummy}/.gitignore +0 -0
- data/spec/dummy/Gemfile +9 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/README.rdoc +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/Rakefile +0 -0
- data/{rails_test/rails-3.0.17/public → spec/dummy/app/assets}/images/rails.png +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/app/assets/javascripts/application.js +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/app/assets/stylesheets/application.css +0 -0
- data/{rails_test/common → spec/dummy}/app/controllers/application_controller.rb +0 -0
- data/{rails_test/common → spec/dummy}/app/controllers/entities_controller.rb +0 -0
- data/{rails_test/common → spec/dummy}/app/controllers/platforms_controller.rb +0 -0
- data/{rails_test/common → spec/dummy}/app/helpers/application_helper.rb +0 -0
- data/{rails_test/common → spec/dummy}/app/helpers/entities_helper.rb +0 -0
- data/{rails_test/common → spec/dummy}/app/helpers/platforms_helper.rb +0 -0
- data/{rails_test/rails-3.0.17/lib/tasks → spec/dummy/app/mailers}/.gitkeep +0 -0
- data/{rails_test/rails-3.0.17/public/stylesheets → spec/dummy/app/models}/.gitkeep +0 -0
- data/{rails_test/common → spec/dummy}/app/models/entity.rb +0 -2
- data/{rails_test/rails-3.1.8 → spec/dummy}/app/models/platform.rb +0 -2
- data/{rails_test/common → spec/dummy}/app/views/application/index.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/entities/_form.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/entities/edit.html.erb +0 -0
- data/{rails_test/rails-3.1.8 → spec/dummy}/app/views/entities/index.html.erb +1 -1
- data/{rails_test/common → spec/dummy}/app/views/entities/new.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/entities/show.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/layouts/application.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/platforms/_form.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/platforms/edit.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/platforms/index.html.erb +1 -1
- data/{rails_test/common → spec/dummy}/app/views/platforms/new.html.erb +0 -0
- data/{rails_test/common → spec/dummy}/app/views/platforms/show.html.erb +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/config.ru +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/application.rb +3 -1
- data/{rails_test/rails-3.0.17 → spec/dummy}/config/boot.rb +0 -0
- data/{rails_test/common → spec/dummy}/config/database.yml +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/environment.rb +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/environments/development.rb +1 -1
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/environments/production.rb +1 -1
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/environments/test.rb +4 -5
- data/{rails_test/rails-3.0.17 → spec/dummy}/config/initializers/backtrace_silencers.rb +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/initializers/inflections.rb +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/config/initializers/mime_types.rb +0 -0
- data/{rails_test/rails-3.1.8 → spec/dummy}/config/initializers/secret_token.rb +1 -1
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/initializers/session_store.rb +0 -0
- data/{rails_test/rails-3.1.8 → spec/dummy}/config/initializers/wrap_parameters.rb +0 -0
- data/{rails_test/rails-3.1.8 → spec/dummy}/config/locales/en.yml +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/config/routes.rb +0 -0
- data/{rails_test/common → spec/dummy}/db/migrate/20110228091428_create_entities.rb +0 -0
- data/{rails_test/common → spec/dummy}/db/migrate/20110228093241_create_platforms.rb +0 -0
- data/{rails_test/common → spec/dummy}/db/migrate/20110228094444_create_versions.rb +0 -0
- data/{rails_test/rails-3.1.8 → spec/dummy}/db/schema.rb +15 -14
- data/{rails_test/rails-3.1.8 → spec/dummy}/db/seeds.rb +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/doc/README_FOR_APP +0 -0
- data/{rails_test/rails-3.0.17/vendor/plugins → spec/dummy/lib/assets}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/app/mailers → spec/dummy/lib/tasks}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/app/models → spec/dummy/log}/.gitkeep +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/public/404.html +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/public/422.html +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/public/500.html +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/public/favicon.ico +0 -0
- data/{rails_test/rails-3.2.8 → spec/dummy}/public/index.html +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/public/robots.txt +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/script/rails +0 -0
- data/{rails_test/rails-3.1.8/lib/assets → spec/dummy/test/fixtures}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/lib/tasks → spec/dummy/test/functional}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/log → spec/dummy/test/integration}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8 → spec/dummy}/test/performance/browsing_test.rb +0 -0
- data/{rails_test/rails-3.0.17 → spec/dummy}/test/test_helper.rb +0 -0
- data/{rails_test/rails-3.1.8/test/fixtures → spec/dummy/test/unit}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/test/functional → spec/dummy/vendor/assets/javascripts}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/test/integration → spec/dummy/vendor/assets/stylesheets}/.gitkeep +0 -0
- data/{rails_test/rails-3.1.8/test/unit → spec/dummy/vendor/plugins}/.gitkeep +0 -0
- data/{rails_test/common/spec → spec}/helpers/entities_helper_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/helpers/platforms_helper_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/integration/navigation_spec.rb +0 -0
- data/{rails_test/rails-3.1.8/spec → spec}/integration/paper_trail_manager_spec.rb +14 -14
- data/{rails_test/common/spec → spec}/models/entity_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/models/platform_spec.rb +0 -0
- data/spec/rails_helper.rb +27 -0
- data/{rails_test/common/spec → spec}/requests/entities_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/requests/platforms_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/routing/entities_routing_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/routing/platforms_routing_spec.rb +0 -0
- data/spec/spec_helper.rb +90 -0
- data/{rails_test/rails-3.0.17/spec → spec}/support/factories.rb +1 -1
- data/{rails_test/common/spec → spec}/views/entities/edit.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/entities/index.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/entities/new.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/entities/show.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/platforms/edit.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/platforms/index.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/platforms/new.html.erb_spec.rb +0 -0
- data/{rails_test/common/spec → spec}/views/platforms/show.html.erb_spec.rb +0 -0
- metadata +368 -458
- data/Gemfile.lock +0 -104
- data/VERSION +0 -1
- data/rails_test/Rakefile +0 -90
- data/rails_test/common/app/models/platform.rb +0 -8
- data/rails_test/common/app/views/entities/index.html.erb +0 -21
- data/rails_test/common/spec/integration/paper_trail_manager_spec.rb +0 -232
- data/rails_test/common/spec/spec_helper.rb +0 -32
- data/rails_test/common/spec/support/factories.rb +0 -14
- data/rails_test/generate_test_directory +0 -59
- data/rails_test/rails-3.0.17/.gitignore +0 -4
- data/rails_test/rails-3.0.17/README +0 -256
- data/rails_test/rails-3.0.17/Rakefile +0 -7
- data/rails_test/rails-3.0.17/app/controllers/application_controller.rb +0 -6
- data/rails_test/rails-3.0.17/app/controllers/entities_controller.rb +0 -83
- data/rails_test/rails-3.0.17/app/controllers/platforms_controller.rb +0 -83
- data/rails_test/rails-3.0.17/app/helpers/application_helper.rb +0 -2
- data/rails_test/rails-3.0.17/app/helpers/entities_helper.rb +0 -2
- data/rails_test/rails-3.0.17/app/helpers/platforms_helper.rb +0 -2
- data/rails_test/rails-3.0.17/app/models/entity.rb +0 -8
- data/rails_test/rails-3.0.17/app/models/platform.rb +0 -8
- data/rails_test/rails-3.0.17/app/views/application/index.html.erb +0 -6
- data/rails_test/rails-3.0.17/app/views/entities/_form.html.erb +0 -17
- data/rails_test/rails-3.0.17/app/views/entities/edit.html.erb +0 -6
- data/rails_test/rails-3.0.17/app/views/entities/index.html.erb +0 -21
- data/rails_test/rails-3.0.17/app/views/entities/new.html.erb +0 -5
- data/rails_test/rails-3.0.17/app/views/entities/show.html.erb +0 -5
- data/rails_test/rails-3.0.17/app/views/layouts/application.html.erb +0 -14
- data/rails_test/rails-3.0.17/app/views/platforms/_form.html.erb +0 -17
- data/rails_test/rails-3.0.17/app/views/platforms/edit.html.erb +0 -6
- data/rails_test/rails-3.0.17/app/views/platforms/index.html.erb +0 -21
- data/rails_test/rails-3.0.17/app/views/platforms/new.html.erb +0 -5
- data/rails_test/rails-3.0.17/app/views/platforms/show.html.erb +0 -5
- data/rails_test/rails-3.0.17/config.ru +0 -4
- data/rails_test/rails-3.0.17/config/application.rb +0 -42
- data/rails_test/rails-3.0.17/config/database.yml +0 -22
- data/rails_test/rails-3.0.17/config/environment.rb +0 -5
- data/rails_test/rails-3.0.17/config/environments/development.rb +0 -26
- data/rails_test/rails-3.0.17/config/environments/production.rb +0 -49
- data/rails_test/rails-3.0.17/config/environments/test.rb +0 -35
- data/rails_test/rails-3.0.17/config/initializers/inflections.rb +0 -10
- data/rails_test/rails-3.0.17/config/initializers/secret_token.rb +0 -7
- data/rails_test/rails-3.0.17/config/initializers/session_store.rb +0 -8
- data/rails_test/rails-3.0.17/config/locales/en.yml +0 -5
- data/rails_test/rails-3.0.17/config/routes.rb +0 -8
- data/rails_test/rails-3.0.17/db/migrate/20110228091428_create_entities.rb +0 -14
- data/rails_test/rails-3.0.17/db/migrate/20110228093241_create_platforms.rb +0 -14
- data/rails_test/rails-3.0.17/db/migrate/20110228094444_create_versions.rb +0 -18
- data/rails_test/rails-3.0.17/db/schema.rb +0 -40
- data/rails_test/rails-3.0.17/db/seeds.rb +0 -7
- data/rails_test/rails-3.0.17/public/500.html +0 -26
- data/rails_test/rails-3.0.17/public/index.html +0 -239
- data/rails_test/rails-3.0.17/public/javascripts/application.js +0 -2
- data/rails_test/rails-3.0.17/public/javascripts/controls.js +0 -965
- data/rails_test/rails-3.0.17/public/javascripts/dragdrop.js +0 -974
- data/rails_test/rails-3.0.17/public/javascripts/effects.js +0 -1123
- data/rails_test/rails-3.0.17/public/javascripts/prototype.js +0 -6001
- data/rails_test/rails-3.0.17/public/javascripts/rails.js +0 -202
- data/rails_test/rails-3.0.17/spec/controllers/entities_controller_spec.rb +0 -125
- data/rails_test/rails-3.0.17/spec/controllers/platforms_controller_spec.rb +0 -125
- data/rails_test/rails-3.0.17/spec/helpers/entities_helper_spec.rb +0 -15
- data/rails_test/rails-3.0.17/spec/helpers/platforms_helper_spec.rb +0 -15
- data/rails_test/rails-3.0.17/spec/integration/navigation_spec.rb +0 -7
- data/rails_test/rails-3.0.17/spec/integration/paper_trail_manager_spec.rb +0 -232
- data/rails_test/rails-3.0.17/spec/models/entity_spec.rb +0 -14
- data/rails_test/rails-3.0.17/spec/models/platform_spec.rb +0 -14
- data/rails_test/rails-3.0.17/spec/requests/entities_spec.rb +0 -11
- data/rails_test/rails-3.0.17/spec/requests/platforms_spec.rb +0 -11
- data/rails_test/rails-3.0.17/spec/routing/entities_routing_spec.rb +0 -35
- data/rails_test/rails-3.0.17/spec/routing/platforms_routing_spec.rb +0 -35
- data/rails_test/rails-3.0.17/spec/spec_helper.rb +0 -32
- data/rails_test/rails-3.0.17/spec/views/entities/edit.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.0.17/spec/views/entities/index.html.erb_spec.rb +0 -14
- data/rails_test/rails-3.0.17/spec/views/entities/new.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.0.17/spec/views/entities/show.html.erb_spec.rb +0 -11
- data/rails_test/rails-3.0.17/spec/views/platforms/edit.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.0.17/spec/views/platforms/index.html.erb_spec.rb +0 -14
- data/rails_test/rails-3.0.17/spec/views/platforms/new.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.0.17/spec/views/platforms/show.html.erb_spec.rb +0 -11
- data/rails_test/rails-3.0.17/test/performance/browsing_test.rb +0 -9
- data/rails_test/rails-3.1.8/README +0 -261
- data/rails_test/rails-3.1.8/Rakefile +0 -7
- data/rails_test/rails-3.1.8/app/assets/images/rails.png +0 -0
- data/rails_test/rails-3.1.8/app/assets/javascripts/application.js +0 -9
- data/rails_test/rails-3.1.8/app/assets/stylesheets/application.css +0 -7
- data/rails_test/rails-3.1.8/app/controllers/application_controller.rb +0 -6
- data/rails_test/rails-3.1.8/app/controllers/entities_controller.rb +0 -83
- data/rails_test/rails-3.1.8/app/controllers/platforms_controller.rb +0 -83
- data/rails_test/rails-3.1.8/app/helpers/application_helper.rb +0 -2
- data/rails_test/rails-3.1.8/app/helpers/entities_helper.rb +0 -2
- data/rails_test/rails-3.1.8/app/helpers/platforms_helper.rb +0 -2
- data/rails_test/rails-3.1.8/app/models/entity.rb +0 -8
- data/rails_test/rails-3.1.8/app/views/application/index.html.erb +0 -6
- data/rails_test/rails-3.1.8/app/views/entities/_form.html.erb +0 -17
- data/rails_test/rails-3.1.8/app/views/entities/edit.html.erb +0 -6
- data/rails_test/rails-3.1.8/app/views/entities/new.html.erb +0 -5
- data/rails_test/rails-3.1.8/app/views/entities/show.html.erb +0 -5
- data/rails_test/rails-3.1.8/app/views/layouts/application.html.erb +0 -14
- data/rails_test/rails-3.1.8/app/views/platforms/_form.html.erb +0 -17
- data/rails_test/rails-3.1.8/app/views/platforms/edit.html.erb +0 -6
- data/rails_test/rails-3.1.8/app/views/platforms/index.html.erb +0 -21
- data/rails_test/rails-3.1.8/app/views/platforms/new.html.erb +0 -5
- data/rails_test/rails-3.1.8/app/views/platforms/show.html.erb +0 -5
- data/rails_test/rails-3.1.8/config.ru +0 -4
- data/rails_test/rails-3.1.8/config/application.rb +0 -48
- data/rails_test/rails-3.1.8/config/boot.rb +0 -6
- data/rails_test/rails-3.1.8/config/database.yml +0 -22
- data/rails_test/rails-3.1.8/config/environment.rb +0 -5
- data/rails_test/rails-3.1.8/config/environments/development.rb +0 -30
- data/rails_test/rails-3.1.8/config/environments/production.rb +0 -60
- data/rails_test/rails-3.1.8/config/environments/test.rb +0 -39
- data/rails_test/rails-3.1.8/config/initializers/backtrace_silencers.rb +0 -7
- data/rails_test/rails-3.1.8/config/initializers/inflections.rb +0 -10
- data/rails_test/rails-3.1.8/config/initializers/mime_types.rb +0 -5
- data/rails_test/rails-3.1.8/config/initializers/session_store.rb +0 -8
- data/rails_test/rails-3.1.8/config/routes.rb +0 -8
- data/rails_test/rails-3.1.8/db/migrate/20110228091428_create_entities.rb +0 -14
- data/rails_test/rails-3.1.8/db/migrate/20110228093241_create_platforms.rb +0 -14
- data/rails_test/rails-3.1.8/db/migrate/20110228094444_create_versions.rb +0 -18
- data/rails_test/rails-3.1.8/doc/README_FOR_APP +0 -2
- data/rails_test/rails-3.1.8/public/404.html +0 -26
- data/rails_test/rails-3.1.8/public/422.html +0 -26
- data/rails_test/rails-3.1.8/public/500.html +0 -26
- data/rails_test/rails-3.1.8/public/favicon.ico +0 -0
- data/rails_test/rails-3.1.8/public/index.html +0 -241
- data/rails_test/rails-3.1.8/public/robots.txt +0 -5
- data/rails_test/rails-3.1.8/script/rails +0 -6
- data/rails_test/rails-3.1.8/spec/controllers/entities_controller_spec.rb +0 -125
- data/rails_test/rails-3.1.8/spec/controllers/platforms_controller_spec.rb +0 -125
- data/rails_test/rails-3.1.8/spec/helpers/entities_helper_spec.rb +0 -15
- data/rails_test/rails-3.1.8/spec/helpers/platforms_helper_spec.rb +0 -15
- data/rails_test/rails-3.1.8/spec/integration/navigation_spec.rb +0 -7
- data/rails_test/rails-3.1.8/spec/models/entity_spec.rb +0 -14
- data/rails_test/rails-3.1.8/spec/models/platform_spec.rb +0 -14
- data/rails_test/rails-3.1.8/spec/requests/entities_spec.rb +0 -11
- data/rails_test/rails-3.1.8/spec/requests/platforms_spec.rb +0 -11
- data/rails_test/rails-3.1.8/spec/routing/entities_routing_spec.rb +0 -35
- data/rails_test/rails-3.1.8/spec/routing/platforms_routing_spec.rb +0 -35
- data/rails_test/rails-3.1.8/spec/spec_helper.rb +0 -32
- data/rails_test/rails-3.1.8/spec/support/factories.rb +0 -14
- data/rails_test/rails-3.1.8/spec/views/entities/edit.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.1.8/spec/views/entities/index.html.erb_spec.rb +0 -14
- data/rails_test/rails-3.1.8/spec/views/entities/new.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.1.8/spec/views/entities/show.html.erb_spec.rb +0 -11
- data/rails_test/rails-3.1.8/spec/views/platforms/edit.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.1.8/spec/views/platforms/index.html.erb_spec.rb +0 -14
- data/rails_test/rails-3.1.8/spec/views/platforms/new.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.1.8/spec/views/platforms/show.html.erb_spec.rb +0 -11
- data/rails_test/rails-3.1.8/test/test_helper.rb +0 -13
- data/rails_test/rails-3.1.8/vendor/assets/stylesheets/.gitkeep +0 -0
- data/rails_test/rails-3.1.8/vendor/plugins/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/.gitignore +0 -15
- data/rails_test/rails-3.2.8/app/assets/images/rails.png +0 -0
- data/rails_test/rails-3.2.8/app/controllers/application_controller.rb +0 -6
- data/rails_test/rails-3.2.8/app/controllers/entities_controller.rb +0 -83
- data/rails_test/rails-3.2.8/app/controllers/platforms_controller.rb +0 -83
- data/rails_test/rails-3.2.8/app/helpers/application_helper.rb +0 -2
- data/rails_test/rails-3.2.8/app/helpers/entities_helper.rb +0 -2
- data/rails_test/rails-3.2.8/app/helpers/platforms_helper.rb +0 -2
- data/rails_test/rails-3.2.8/app/mailers/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/app/models/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/app/models/entity.rb +0 -8
- data/rails_test/rails-3.2.8/app/models/platform.rb +0 -8
- data/rails_test/rails-3.2.8/app/views/application/index.html.erb +0 -6
- data/rails_test/rails-3.2.8/app/views/entities/_form.html.erb +0 -17
- data/rails_test/rails-3.2.8/app/views/entities/edit.html.erb +0 -6
- data/rails_test/rails-3.2.8/app/views/entities/index.html.erb +0 -21
- data/rails_test/rails-3.2.8/app/views/entities/new.html.erb +0 -5
- data/rails_test/rails-3.2.8/app/views/entities/show.html.erb +0 -5
- data/rails_test/rails-3.2.8/app/views/layouts/application.html.erb +0 -14
- data/rails_test/rails-3.2.8/app/views/platforms/_form.html.erb +0 -17
- data/rails_test/rails-3.2.8/app/views/platforms/edit.html.erb +0 -6
- data/rails_test/rails-3.2.8/app/views/platforms/index.html.erb +0 -21
- data/rails_test/rails-3.2.8/app/views/platforms/new.html.erb +0 -5
- data/rails_test/rails-3.2.8/app/views/platforms/show.html.erb +0 -5
- data/rails_test/rails-3.2.8/config/boot.rb +0 -6
- data/rails_test/rails-3.2.8/config/database.yml +0 -22
- data/rails_test/rails-3.2.8/config/initializers/backtrace_silencers.rb +0 -7
- data/rails_test/rails-3.2.8/config/initializers/mime_types.rb +0 -5
- data/rails_test/rails-3.2.8/config/initializers/secret_token.rb +0 -7
- data/rails_test/rails-3.2.8/config/initializers/wrap_parameters.rb +0 -14
- data/rails_test/rails-3.2.8/config/locales/en.yml +0 -5
- data/rails_test/rails-3.2.8/db/migrate/20110228091428_create_entities.rb +0 -14
- data/rails_test/rails-3.2.8/db/migrate/20110228093241_create_platforms.rb +0 -14
- data/rails_test/rails-3.2.8/db/migrate/20110228094444_create_versions.rb +0 -18
- data/rails_test/rails-3.2.8/db/schema.rb +0 -40
- data/rails_test/rails-3.2.8/db/seeds.rb +0 -7
- data/rails_test/rails-3.2.8/doc/README_FOR_APP +0 -2
- data/rails_test/rails-3.2.8/lib/assets/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/lib/tasks/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/log/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/public/404.html +0 -26
- data/rails_test/rails-3.2.8/public/422.html +0 -26
- data/rails_test/rails-3.2.8/public/favicon.ico +0 -0
- data/rails_test/rails-3.2.8/public/robots.txt +0 -5
- data/rails_test/rails-3.2.8/script/rails +0 -6
- data/rails_test/rails-3.2.8/spec/controllers/entities_controller_spec.rb +0 -125
- data/rails_test/rails-3.2.8/spec/controllers/platforms_controller_spec.rb +0 -125
- data/rails_test/rails-3.2.8/spec/helpers/entities_helper_spec.rb +0 -15
- data/rails_test/rails-3.2.8/spec/helpers/platforms_helper_spec.rb +0 -15
- data/rails_test/rails-3.2.8/spec/integration/navigation_spec.rb +0 -7
- data/rails_test/rails-3.2.8/spec/integration/paper_trail_manager_spec.rb +0 -232
- data/rails_test/rails-3.2.8/spec/models/entity_spec.rb +0 -14
- data/rails_test/rails-3.2.8/spec/models/platform_spec.rb +0 -14
- data/rails_test/rails-3.2.8/spec/requests/entities_spec.rb +0 -11
- data/rails_test/rails-3.2.8/spec/requests/platforms_spec.rb +0 -11
- data/rails_test/rails-3.2.8/spec/routing/entities_routing_spec.rb +0 -35
- data/rails_test/rails-3.2.8/spec/routing/platforms_routing_spec.rb +0 -35
- data/rails_test/rails-3.2.8/spec/spec_helper.rb +0 -32
- data/rails_test/rails-3.2.8/spec/support/factories.rb +0 -14
- data/rails_test/rails-3.2.8/spec/views/entities/edit.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.2.8/spec/views/entities/index.html.erb_spec.rb +0 -14
- data/rails_test/rails-3.2.8/spec/views/entities/new.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.2.8/spec/views/entities/show.html.erb_spec.rb +0 -11
- data/rails_test/rails-3.2.8/spec/views/platforms/edit.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.2.8/spec/views/platforms/index.html.erb_spec.rb +0 -14
- data/rails_test/rails-3.2.8/spec/views/platforms/new.html.erb_spec.rb +0 -15
- data/rails_test/rails-3.2.8/spec/views/platforms/show.html.erb_spec.rb +0 -11
- data/rails_test/rails-3.2.8/test/fixtures/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/test/functional/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/test/integration/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/test/performance/browsing_test.rb +0 -12
- data/rails_test/rails-3.2.8/test/test_helper.rb +0 -13
- data/rails_test/rails-3.2.8/test/unit/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/vendor/assets/javascripts/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/vendor/assets/stylesheets/.gitkeep +0 -0
- data/rails_test/rails-3.2.8/vendor/plugins/.gitkeep +0 -0
@@ -1,202 +0,0 @@
|
|
1
|
-
(function() {
|
2
|
-
Ajax.Responders.register({
|
3
|
-
onCreate: function(request) {
|
4
|
-
var token = $$('meta[name=csrf-token]')[0];
|
5
|
-
if (token) {
|
6
|
-
if (!request.options.requestHeaders) request.options.requestHeaders = {};
|
7
|
-
request.options.requestHeaders['X-CSRF-Token'] = token.readAttribute('content');
|
8
|
-
}
|
9
|
-
}
|
10
|
-
});
|
11
|
-
|
12
|
-
// Technique from Juriy Zaytsev
|
13
|
-
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
|
14
|
-
function isEventSupported(eventName) {
|
15
|
-
var el = document.createElement('div');
|
16
|
-
eventName = 'on' + eventName;
|
17
|
-
var isSupported = (eventName in el);
|
18
|
-
if (!isSupported) {
|
19
|
-
el.setAttribute(eventName, 'return;');
|
20
|
-
isSupported = typeof el[eventName] == 'function';
|
21
|
-
}
|
22
|
-
el = null;
|
23
|
-
return isSupported;
|
24
|
-
}
|
25
|
-
|
26
|
-
function isForm(element) {
|
27
|
-
return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM';
|
28
|
-
}
|
29
|
-
|
30
|
-
function isInput(element) {
|
31
|
-
if (Object.isElement(element)) {
|
32
|
-
var name = element.nodeName.toUpperCase();
|
33
|
-
return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA';
|
34
|
-
}
|
35
|
-
else return false;
|
36
|
-
}
|
37
|
-
|
38
|
-
var submitBubbles = isEventSupported('submit'),
|
39
|
-
changeBubbles = isEventSupported('change');
|
40
|
-
|
41
|
-
if (!submitBubbles || !changeBubbles) {
|
42
|
-
// augment the Event.Handler class to observe custom events when needed
|
43
|
-
Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
|
44
|
-
function(init, element, eventName, selector, callback) {
|
45
|
-
init(element, eventName, selector, callback);
|
46
|
-
// is the handler being attached to an element that doesn't support this event?
|
47
|
-
if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
|
48
|
-
(!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
|
49
|
-
// "submit" => "emulated:submit"
|
50
|
-
this.eventName = 'emulated:' + this.eventName;
|
51
|
-
}
|
52
|
-
}
|
53
|
-
);
|
54
|
-
}
|
55
|
-
|
56
|
-
if (!submitBubbles) {
|
57
|
-
// discover forms on the page by observing focus events which always bubble
|
58
|
-
document.on('focusin', 'form', function(focusEvent, form) {
|
59
|
-
// special handler for the real "submit" event (one-time operation)
|
60
|
-
if (!form.retrieve('emulated:submit')) {
|
61
|
-
form.on('submit', function(submitEvent) {
|
62
|
-
var emulated = form.fire('emulated:submit', submitEvent, true);
|
63
|
-
// if custom event received preventDefault, cancel the real one too
|
64
|
-
if (emulated.returnValue === false) submitEvent.preventDefault();
|
65
|
-
});
|
66
|
-
form.store('emulated:submit', true);
|
67
|
-
}
|
68
|
-
});
|
69
|
-
}
|
70
|
-
|
71
|
-
if (!changeBubbles) {
|
72
|
-
// discover form inputs on the page
|
73
|
-
document.on('focusin', 'input, select, textarea', function(focusEvent, input) {
|
74
|
-
// special handler for real "change" events
|
75
|
-
if (!input.retrieve('emulated:change')) {
|
76
|
-
input.on('change', function(changeEvent) {
|
77
|
-
input.fire('emulated:change', changeEvent, true);
|
78
|
-
});
|
79
|
-
input.store('emulated:change', true);
|
80
|
-
}
|
81
|
-
});
|
82
|
-
}
|
83
|
-
|
84
|
-
function handleRemote(element) {
|
85
|
-
var method, url, params;
|
86
|
-
|
87
|
-
var event = element.fire("ajax:before");
|
88
|
-
if (event.stopped) return false;
|
89
|
-
|
90
|
-
if (element.tagName.toLowerCase() === 'form') {
|
91
|
-
method = element.readAttribute('method') || 'post';
|
92
|
-
url = element.readAttribute('action');
|
93
|
-
// serialize the form with respect to the submit button that was pressed
|
94
|
-
params = element.serialize({ submit: element.retrieve('rails:submit-button') });
|
95
|
-
// clear the pressed submit button information
|
96
|
-
element.store('rails:submit-button', null);
|
97
|
-
} else {
|
98
|
-
method = element.readAttribute('data-method') || 'get';
|
99
|
-
url = element.readAttribute('href');
|
100
|
-
params = {};
|
101
|
-
}
|
102
|
-
|
103
|
-
new Ajax.Request(url, {
|
104
|
-
method: method,
|
105
|
-
parameters: params,
|
106
|
-
evalScripts: true,
|
107
|
-
|
108
|
-
onCreate: function(response) { element.fire("ajax:create", response); },
|
109
|
-
onComplete: function(response) { element.fire("ajax:complete", response); },
|
110
|
-
onSuccess: function(response) { element.fire("ajax:success", response); },
|
111
|
-
onFailure: function(response) { element.fire("ajax:failure", response); }
|
112
|
-
});
|
113
|
-
|
114
|
-
element.fire("ajax:after");
|
115
|
-
}
|
116
|
-
|
117
|
-
function insertHiddenField(form, name, value) {
|
118
|
-
form.insert(new Element('input', { type: 'hidden', name: name, value: value }));
|
119
|
-
}
|
120
|
-
|
121
|
-
function handleMethod(element) {
|
122
|
-
var method = element.readAttribute('data-method'),
|
123
|
-
url = element.readAttribute('href'),
|
124
|
-
csrf_param = $$('meta[name=csrf-param]')[0],
|
125
|
-
csrf_token = $$('meta[name=csrf-token]')[0];
|
126
|
-
|
127
|
-
var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
|
128
|
-
$(element.parentNode).insert(form);
|
129
|
-
|
130
|
-
if (method !== 'post') {
|
131
|
-
insertHiddenField(form, '_method', method);
|
132
|
-
}
|
133
|
-
|
134
|
-
if (csrf_param) {
|
135
|
-
insertHiddenField(form, csrf_param.readAttribute('content'), csrf_token.readAttribute('content'));
|
136
|
-
}
|
137
|
-
|
138
|
-
form.submit();
|
139
|
-
}
|
140
|
-
|
141
|
-
function disableFormElements(form) {
|
142
|
-
form.select('input[type=submit][data-disable-with]').each(function(input) {
|
143
|
-
input.store('rails:original-value', input.getValue());
|
144
|
-
input.setValue(input.readAttribute('data-disable-with')).disable();
|
145
|
-
});
|
146
|
-
}
|
147
|
-
|
148
|
-
function enableFormElements(form) {
|
149
|
-
form.select('input[type=submit][data-disable-with]').each(function(input) {
|
150
|
-
input.setValue(input.retrieve('rails:original-value')).enable();
|
151
|
-
});
|
152
|
-
}
|
153
|
-
|
154
|
-
function allowAction(element) {
|
155
|
-
var message = element.readAttribute('data-confirm');
|
156
|
-
return !message || confirm(message);
|
157
|
-
}
|
158
|
-
|
159
|
-
document.on('click', 'a[data-confirm], a[data-remote], a[data-method]', function(event, link) {
|
160
|
-
if (!allowAction(link)) {
|
161
|
-
event.stop();
|
162
|
-
return false;
|
163
|
-
}
|
164
|
-
|
165
|
-
if (link.readAttribute('data-remote')) {
|
166
|
-
handleRemote(link);
|
167
|
-
event.stop();
|
168
|
-
} else if (link.readAttribute('data-method')) {
|
169
|
-
handleMethod(link);
|
170
|
-
event.stop();
|
171
|
-
}
|
172
|
-
});
|
173
|
-
|
174
|
-
document.on("click", "form input[type=submit], form button[type=submit], form button:not([type])", function(event, button) {
|
175
|
-
// register the pressed submit button
|
176
|
-
event.findElement('form').store('rails:submit-button', button.name || false);
|
177
|
-
});
|
178
|
-
|
179
|
-
document.on("submit", function(event) {
|
180
|
-
var form = event.findElement();
|
181
|
-
|
182
|
-
if (!allowAction(form)) {
|
183
|
-
event.stop();
|
184
|
-
return false;
|
185
|
-
}
|
186
|
-
|
187
|
-
if (form.readAttribute('data-remote')) {
|
188
|
-
handleRemote(form);
|
189
|
-
event.stop();
|
190
|
-
} else {
|
191
|
-
disableFormElements(form);
|
192
|
-
}
|
193
|
-
});
|
194
|
-
|
195
|
-
document.on('ajax:create', 'form', function(event, form) {
|
196
|
-
if (form == event.findElement()) disableFormElements(form);
|
197
|
-
});
|
198
|
-
|
199
|
-
document.on('ajax:complete', 'form', function(event, form) {
|
200
|
-
if (form == event.findElement()) enableFormElements(form);
|
201
|
-
});
|
202
|
-
})();
|
@@ -1,125 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
-
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
-
# was generated by the Rails when you ran the scaffold generator.
|
6
|
-
|
7
|
-
describe EntitiesController do
|
8
|
-
|
9
|
-
def mock_entity(stubs={})
|
10
|
-
@mock_entity ||= mock_model(Entity, stubs).as_null_object
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "GET index" do
|
14
|
-
it "assigns all entities as @entities" do
|
15
|
-
Entity.stub(:all) { [mock_entity] }
|
16
|
-
get :index
|
17
|
-
assigns(:entities).should eq([mock_entity])
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "GET show" do
|
22
|
-
it "assigns the requested entity as @entity" do
|
23
|
-
Entity.stub(:find).with("37") { mock_entity }
|
24
|
-
get :show, :id => "37"
|
25
|
-
assigns(:entity).should be(mock_entity)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
describe "GET new" do
|
30
|
-
it "assigns a new entity as @entity" do
|
31
|
-
Entity.stub(:new) { mock_entity }
|
32
|
-
get :new
|
33
|
-
assigns(:entity).should be(mock_entity)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
describe "GET edit" do
|
38
|
-
it "assigns the requested entity as @entity" do
|
39
|
-
Entity.stub(:find).with("37") { mock_entity }
|
40
|
-
get :edit, :id => "37"
|
41
|
-
assigns(:entity).should be(mock_entity)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "POST create" do
|
46
|
-
describe "with valid params" do
|
47
|
-
it "assigns a newly created entity as @entity" do
|
48
|
-
Entity.stub(:new).with({'these' => 'params'}) { mock_entity(:save => true) }
|
49
|
-
post :create, :entity => {'these' => 'params'}
|
50
|
-
assigns(:entity).should be(mock_entity)
|
51
|
-
end
|
52
|
-
|
53
|
-
it "redirects to the created entity" do
|
54
|
-
Entity.stub(:new) { mock_entity(:save => true) }
|
55
|
-
post :create, :entity => {}
|
56
|
-
response.should redirect_to(entity_url(mock_entity))
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
describe "with invalid params" do
|
61
|
-
it "assigns a newly created but unsaved entity as @entity" do
|
62
|
-
Entity.stub(:new).with({'these' => 'params'}) { mock_entity(:save => false) }
|
63
|
-
post :create, :entity => {'these' => 'params'}
|
64
|
-
assigns(:entity).should be(mock_entity)
|
65
|
-
end
|
66
|
-
|
67
|
-
it "re-renders the 'new' template" do
|
68
|
-
Entity.stub(:new) { mock_entity(:save => false) }
|
69
|
-
post :create, :entity => {}
|
70
|
-
response.should render_template("new")
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
describe "PUT update" do
|
76
|
-
describe "with valid params" do
|
77
|
-
it "updates the requested entity" do
|
78
|
-
Entity.stub(:find).with("37") { mock_entity }
|
79
|
-
mock_entity.should_receive(:update_attributes).with({'these' => 'params'})
|
80
|
-
put :update, :id => "37", :entity => {'these' => 'params'}
|
81
|
-
end
|
82
|
-
|
83
|
-
it "assigns the requested entity as @entity" do
|
84
|
-
Entity.stub(:find) { mock_entity(:update_attributes => true) }
|
85
|
-
put :update, :id => "1"
|
86
|
-
assigns(:entity).should be(mock_entity)
|
87
|
-
end
|
88
|
-
|
89
|
-
it "redirects to the entity" do
|
90
|
-
Entity.stub(:find) { mock_entity(:update_attributes => true) }
|
91
|
-
put :update, :id => "1"
|
92
|
-
response.should redirect_to(entity_url(mock_entity))
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe "with invalid params" do
|
97
|
-
it "assigns the entity as @entity" do
|
98
|
-
Entity.stub(:find) { mock_entity(:update_attributes => false) }
|
99
|
-
put :update, :id => "1"
|
100
|
-
assigns(:entity).should be(mock_entity)
|
101
|
-
end
|
102
|
-
|
103
|
-
it "re-renders the 'edit' template" do
|
104
|
-
Entity.stub(:find) { mock_entity(:update_attributes => false) }
|
105
|
-
put :update, :id => "1"
|
106
|
-
response.should render_template("edit")
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
describe "DELETE destroy" do
|
112
|
-
it "destroys the requested entity" do
|
113
|
-
Entity.stub(:find).with("37") { mock_entity }
|
114
|
-
mock_entity.should_receive(:destroy)
|
115
|
-
delete :destroy, :id => "37"
|
116
|
-
end
|
117
|
-
|
118
|
-
it "redirects to the entities list" do
|
119
|
-
Entity.stub(:find) { mock_entity }
|
120
|
-
delete :destroy, :id => "1"
|
121
|
-
response.should redirect_to(entities_url)
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
end
|
@@ -1,125 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
-
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
-
# was generated by the Rails when you ran the scaffold generator.
|
6
|
-
|
7
|
-
describe PlatformsController do
|
8
|
-
|
9
|
-
def mock_platform(stubs={})
|
10
|
-
@mock_platform ||= mock_model(Platform, stubs).as_null_object
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "GET index" do
|
14
|
-
it "assigns all platforms as @platforms" do
|
15
|
-
Platform.stub(:all) { [mock_platform] }
|
16
|
-
get :index
|
17
|
-
assigns(:platforms).should eq([mock_platform])
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "GET show" do
|
22
|
-
it "assigns the requested platform as @platform" do
|
23
|
-
Platform.stub(:find).with("37") { mock_platform }
|
24
|
-
get :show, :id => "37"
|
25
|
-
assigns(:platform).should be(mock_platform)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
describe "GET new" do
|
30
|
-
it "assigns a new platform as @platform" do
|
31
|
-
Platform.stub(:new) { mock_platform }
|
32
|
-
get :new
|
33
|
-
assigns(:platform).should be(mock_platform)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
describe "GET edit" do
|
38
|
-
it "assigns the requested platform as @platform" do
|
39
|
-
Platform.stub(:find).with("37") { mock_platform }
|
40
|
-
get :edit, :id => "37"
|
41
|
-
assigns(:platform).should be(mock_platform)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "POST create" do
|
46
|
-
describe "with valid params" do
|
47
|
-
it "assigns a newly created platform as @platform" do
|
48
|
-
Platform.stub(:new).with({'these' => 'params'}) { mock_platform(:save => true) }
|
49
|
-
post :create, :platform => {'these' => 'params'}
|
50
|
-
assigns(:platform).should be(mock_platform)
|
51
|
-
end
|
52
|
-
|
53
|
-
it "redirects to the created platform" do
|
54
|
-
Platform.stub(:new) { mock_platform(:save => true) }
|
55
|
-
post :create, :platform => {}
|
56
|
-
response.should redirect_to(platform_url(mock_platform))
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
describe "with invalid params" do
|
61
|
-
it "assigns a newly created but unsaved platform as @platform" do
|
62
|
-
Platform.stub(:new).with({'these' => 'params'}) { mock_platform(:save => false) }
|
63
|
-
post :create, :platform => {'these' => 'params'}
|
64
|
-
assigns(:platform).should be(mock_platform)
|
65
|
-
end
|
66
|
-
|
67
|
-
it "re-renders the 'new' template" do
|
68
|
-
Platform.stub(:new) { mock_platform(:save => false) }
|
69
|
-
post :create, :platform => {}
|
70
|
-
response.should render_template("new")
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
describe "PUT update" do
|
76
|
-
describe "with valid params" do
|
77
|
-
it "updates the requested platform" do
|
78
|
-
Platform.stub(:find).with("37") { mock_platform }
|
79
|
-
mock_platform.should_receive(:update_attributes).with({'these' => 'params'})
|
80
|
-
put :update, :id => "37", :platform => {'these' => 'params'}
|
81
|
-
end
|
82
|
-
|
83
|
-
it "assigns the requested platform as @platform" do
|
84
|
-
Platform.stub(:find) { mock_platform(:update_attributes => true) }
|
85
|
-
put :update, :id => "1"
|
86
|
-
assigns(:platform).should be(mock_platform)
|
87
|
-
end
|
88
|
-
|
89
|
-
it "redirects to the platform" do
|
90
|
-
Platform.stub(:find) { mock_platform(:update_attributes => true) }
|
91
|
-
put :update, :id => "1"
|
92
|
-
response.should redirect_to(platform_url(mock_platform))
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe "with invalid params" do
|
97
|
-
it "assigns the platform as @platform" do
|
98
|
-
Platform.stub(:find) { mock_platform(:update_attributes => false) }
|
99
|
-
put :update, :id => "1"
|
100
|
-
assigns(:platform).should be(mock_platform)
|
101
|
-
end
|
102
|
-
|
103
|
-
it "re-renders the 'edit' template" do
|
104
|
-
Platform.stub(:find) { mock_platform(:update_attributes => false) }
|
105
|
-
put :update, :id => "1"
|
106
|
-
response.should render_template("edit")
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
describe "DELETE destroy" do
|
112
|
-
it "destroys the requested platform" do
|
113
|
-
Platform.stub(:find).with("37") { mock_platform }
|
114
|
-
mock_platform.should_receive(:destroy)
|
115
|
-
delete :destroy, :id => "37"
|
116
|
-
end
|
117
|
-
|
118
|
-
it "redirects to the platforms list" do
|
119
|
-
Platform.stub(:find) { mock_platform }
|
120
|
-
delete :destroy, :id => "1"
|
121
|
-
response.should redirect_to(platforms_url)
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
end
|