├── .gitignore ├── LICENSE ├── README.md ├── bin ├── build ├── build-zip ├── release └── vbump ├── book ├── antipatterns │ ├── bloated_factories.md │ ├── brittle_tests.md │ ├── duplication.md │ ├── false_positives.md │ ├── intermittent_failures.md │ ├── let.md │ ├── logic.md │ ├── slow_tests.md │ ├── stubbing_the_system_under_test.md │ ├── testing_behavior_not_implementation.md │ ├── testing_code_you_dont_own.md │ ├── testing_implementation_details.md │ └── using_factories_like_fixtures.md ├── book.md ├── conclusion.md ├── images │ ├── cover.pdf │ ├── coverage-report-index.png │ ├── coverage-report-show.png │ ├── rails-test-types.png │ └── tdd-cycle.png ├── intermediate_testing │ ├── ci.md │ ├── coverage.md │ ├── external_services.md │ ├── javascript.md │ ├── javascript │ │ ├── ajax.md │ │ ├── cleaning_up.md │ │ ├── unit_tests.md │ │ ├── waiting.md │ │ └── webdrivers.md │ ├── page_objects.md │ ├── testing_in_isolation.md │ └── testing_in_isolation │ │ ├── a_pragmatic_approach.md │ │ ├── benefits.md │ │ ├── dangers.md │ │ ├── stubbing.md │ │ ├── terminology.md │ │ ├── test_doubles.md │ │ └── testing_side_effects.md ├── introduction │ ├── characteristics_of_an_effective_test_suite.md │ ├── example_app.md │ ├── rspec.md │ ├── test_driven_development.md │ └── why_test.md ├── otherbooks.md ├── sample.md └── types_of_tests │ ├── controller_specs.md │ ├── controller_specs │ └── invalid_links.md │ ├── feature_specs.md │ ├── feature_specs │ ├── submitting_a_link_post.md │ ├── submitting_an_invalid_link.md │ ├── viewing_the_homepage.md │ └── voting_on_links.md │ ├── helper_specs.md │ ├── helper_specs │ └── formatting_the_score.md │ ├── mailer_specs.md │ ├── model_specs.md │ ├── model_specs │ ├── class_methods.md │ ├── instance_methods.md │ └── validations_and_associations.md │ ├── request_specs.md │ ├── request_specs │ ├── creating_links.md │ └── viewing_links.md │ ├── testing_pyramid.md │ ├── view_specs.md │ └── view_specs │ └── rendering_images_inline.md ├── example_app ├── .gitignore ├── .gitkeep ├── .rspec ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── README.md ├── Rakefile ├── app │ ├── assets │ │ ├── images │ │ │ └── .keep │ │ ├── javascripts │ │ │ └── application.js │ │ └── stylesheets │ │ │ └── application.css │ ├── controllers │ │ ├── api │ │ │ ├── base_controller.rb │ │ │ └── v1 │ │ │ │ └── links_controller.rb │ │ ├── application_controller.rb │ │ ├── concerns │ │ │ └── .keep │ │ ├── downvotes_controller.rb │ │ ├── links_controller.rb │ │ ├── new_links_controller.rb │ │ └── upvotes_controller.rb │ ├── helpers │ │ └── application_helper.rb │ ├── mailers │ │ ├── .keep │ │ ├── application_mailer.rb │ │ └── link_mailer.rb │ ├── models │ │ ├── .keep │ │ ├── concerns │ │ │ └── .keep │ │ ├── link.rb │ │ └── score.rb │ ├── serializers │ │ └── link_serializer.rb │ └── views │ │ ├── application │ │ ├── _error_messages.html.erb │ │ └── _navigation.html.erb │ │ ├── layouts │ │ └── application.html.erb │ │ ├── link_mailer │ │ ├── new_link.html.erb │ │ └── new_link.text.erb │ │ └── links │ │ ├── _link.html.erb │ │ ├── _link_list_item.html.erb │ │ ├── index.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb ├── bin │ ├── bundle │ ├── rails │ ├── rake │ ├── setup │ └── spring ├── config.ru ├── config │ ├── application.rb │ ├── boot.rb │ ├── database.yml │ ├── environment.rb │ ├── environments │ │ ├── development.rb │ │ ├── production.rb │ │ └── test.rb │ ├── initializers │ │ ├── assets.rb │ │ ├── backtrace_silencers.rb │ │ ├── cookies_serializer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── inflections.rb │ │ ├── mime_types.rb │ │ ├── session_store.rb │ │ └── wrap_parameters.rb │ ├── locales │ │ └── en.yml │ ├── routes.rb │ └── secrets.yml ├── db │ ├── migrate │ │ ├── 20150408194827_create_links.rb │ │ └── 20150504154305_add_upvotes_and_downvotes_to_links.rb │ ├── schema.rb │ └── seeds.rb ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep ├── log │ └── .keep ├── public │ ├── 404.html │ ├── 422.html │ ├── 500.html │ ├── favicon.ico │ └── robots.txt ├── spec │ ├── controllers │ │ └── links_controller_spec.rb │ ├── factories.rb │ ├── features │ │ ├── user_downvotes_a_link_spec.rb │ │ ├── user_submits_a_link_spec.rb │ │ ├── user_upvotes_a_link_spec.rb │ │ ├── user_views_homepage_spec.rb │ │ └── user_views_new_links_spec.rb │ ├── helpers │ │ └── application_helper_spec.rb │ ├── mailers │ │ └── link_mailer_spec.rb │ ├── models │ │ ├── link_spec.rb │ │ └── score_spec.rb │ ├── rails_helper.rb │ ├── requests │ │ └── api │ │ │ └── v1 │ │ │ └── links_spec.rb │ ├── spec_helper.rb │ ├── support │ │ ├── api_helpers.rb │ │ ├── email_spec.rb │ │ └── factory_girl.rb │ └── views │ │ └── links │ │ ├── _link.html.erb_spec.rb │ │ └── show.html.erb_spec.rb └── vendor │ └── assets │ ├── javascripts │ └── .keep │ └── stylesheets │ └── .keep └── release ├── cover.pdf ├── cover.png ├── images ├── cover.pdf ├── cover.png ├── coverage-report-index.png ├── coverage-report-show.png ├── rails-test-types.png └── tdd-cycle.png ├── tdd-cycle.png ├── testing-rails.epub ├── testing-rails.html ├── testing-rails.md ├── testing-rails.mobi ├── testing-rails.pdf └── testing-rails.toc.html /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/README.md -------------------------------------------------------------------------------- /bin/build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/bin/build -------------------------------------------------------------------------------- /bin/build-zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/bin/build-zip -------------------------------------------------------------------------------- /bin/release: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/bin/release -------------------------------------------------------------------------------- /bin/vbump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/bin/vbump -------------------------------------------------------------------------------- /book/antipatterns/bloated_factories.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/bloated_factories.md -------------------------------------------------------------------------------- /book/antipatterns/brittle_tests.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/brittle_tests.md -------------------------------------------------------------------------------- /book/antipatterns/duplication.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/duplication.md -------------------------------------------------------------------------------- /book/antipatterns/false_positives.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/false_positives.md -------------------------------------------------------------------------------- /book/antipatterns/intermittent_failures.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/intermittent_failures.md -------------------------------------------------------------------------------- /book/antipatterns/let.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/let.md -------------------------------------------------------------------------------- /book/antipatterns/logic.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/logic.md -------------------------------------------------------------------------------- /book/antipatterns/slow_tests.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/slow_tests.md -------------------------------------------------------------------------------- /book/antipatterns/stubbing_the_system_under_test.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/stubbing_the_system_under_test.md -------------------------------------------------------------------------------- /book/antipatterns/testing_behavior_not_implementation.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/testing_behavior_not_implementation.md -------------------------------------------------------------------------------- /book/antipatterns/testing_code_you_dont_own.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/testing_code_you_dont_own.md -------------------------------------------------------------------------------- /book/antipatterns/testing_implementation_details.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/testing_implementation_details.md -------------------------------------------------------------------------------- /book/antipatterns/using_factories_like_fixtures.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/antipatterns/using_factories_like_fixtures.md -------------------------------------------------------------------------------- /book/book.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/book.md -------------------------------------------------------------------------------- /book/conclusion.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/conclusion.md -------------------------------------------------------------------------------- /book/images/cover.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/images/cover.pdf -------------------------------------------------------------------------------- /book/images/coverage-report-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/images/coverage-report-index.png -------------------------------------------------------------------------------- /book/images/coverage-report-show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/images/coverage-report-show.png -------------------------------------------------------------------------------- /book/images/rails-test-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/images/rails-test-types.png -------------------------------------------------------------------------------- /book/images/tdd-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/images/tdd-cycle.png -------------------------------------------------------------------------------- /book/intermediate_testing/ci.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/ci.md -------------------------------------------------------------------------------- /book/intermediate_testing/coverage.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/coverage.md -------------------------------------------------------------------------------- /book/intermediate_testing/external_services.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/external_services.md -------------------------------------------------------------------------------- /book/intermediate_testing/javascript.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/javascript.md -------------------------------------------------------------------------------- /book/intermediate_testing/javascript/ajax.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/javascript/ajax.md -------------------------------------------------------------------------------- /book/intermediate_testing/javascript/cleaning_up.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/javascript/cleaning_up.md -------------------------------------------------------------------------------- /book/intermediate_testing/javascript/unit_tests.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/javascript/unit_tests.md -------------------------------------------------------------------------------- /book/intermediate_testing/javascript/waiting.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/javascript/waiting.md -------------------------------------------------------------------------------- /book/intermediate_testing/javascript/webdrivers.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/javascript/webdrivers.md -------------------------------------------------------------------------------- /book/intermediate_testing/page_objects.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/page_objects.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/a_pragmatic_approach.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/a_pragmatic_approach.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/benefits.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/benefits.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/dangers.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/dangers.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/stubbing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/stubbing.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/terminology.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/terminology.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/test_doubles.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/test_doubles.md -------------------------------------------------------------------------------- /book/intermediate_testing/testing_in_isolation/testing_side_effects.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/intermediate_testing/testing_in_isolation/testing_side_effects.md -------------------------------------------------------------------------------- /book/introduction/characteristics_of_an_effective_test_suite.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/introduction/characteristics_of_an_effective_test_suite.md -------------------------------------------------------------------------------- /book/introduction/example_app.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/introduction/example_app.md -------------------------------------------------------------------------------- /book/introduction/rspec.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/introduction/rspec.md -------------------------------------------------------------------------------- /book/introduction/test_driven_development.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/introduction/test_driven_development.md -------------------------------------------------------------------------------- /book/introduction/why_test.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/introduction/why_test.md -------------------------------------------------------------------------------- /book/otherbooks.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/otherbooks.md -------------------------------------------------------------------------------- /book/sample.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/sample.md -------------------------------------------------------------------------------- /book/types_of_tests/controller_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/controller_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/controller_specs/invalid_links.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/controller_specs/invalid_links.md -------------------------------------------------------------------------------- /book/types_of_tests/feature_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/feature_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/feature_specs/submitting_a_link_post.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/feature_specs/submitting_a_link_post.md -------------------------------------------------------------------------------- /book/types_of_tests/feature_specs/submitting_an_invalid_link.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/feature_specs/submitting_an_invalid_link.md -------------------------------------------------------------------------------- /book/types_of_tests/feature_specs/viewing_the_homepage.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/feature_specs/viewing_the_homepage.md -------------------------------------------------------------------------------- /book/types_of_tests/feature_specs/voting_on_links.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/feature_specs/voting_on_links.md -------------------------------------------------------------------------------- /book/types_of_tests/helper_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/helper_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/helper_specs/formatting_the_score.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/helper_specs/formatting_the_score.md -------------------------------------------------------------------------------- /book/types_of_tests/mailer_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/mailer_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/model_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/model_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/model_specs/class_methods.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/model_specs/class_methods.md -------------------------------------------------------------------------------- /book/types_of_tests/model_specs/instance_methods.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/model_specs/instance_methods.md -------------------------------------------------------------------------------- /book/types_of_tests/model_specs/validations_and_associations.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/model_specs/validations_and_associations.md -------------------------------------------------------------------------------- /book/types_of_tests/request_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/request_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/request_specs/creating_links.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/request_specs/creating_links.md -------------------------------------------------------------------------------- /book/types_of_tests/request_specs/viewing_links.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/request_specs/viewing_links.md -------------------------------------------------------------------------------- /book/types_of_tests/testing_pyramid.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/testing_pyramid.md -------------------------------------------------------------------------------- /book/types_of_tests/view_specs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/view_specs.md -------------------------------------------------------------------------------- /book/types_of_tests/view_specs/rendering_images_inline.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/book/types_of_tests/view_specs/rendering_images_inline.md -------------------------------------------------------------------------------- /example_app/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/.gitignore -------------------------------------------------------------------------------- /example_app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /example_app/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.2.0 2 | -------------------------------------------------------------------------------- /example_app/Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/Gemfile -------------------------------------------------------------------------------- /example_app/Gemfile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/Gemfile.lock -------------------------------------------------------------------------------- /example_app/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/README.md -------------------------------------------------------------------------------- /example_app/Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/Rakefile -------------------------------------------------------------------------------- /example_app/app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/app/assets/javascripts/application.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/assets/javascripts/application.js -------------------------------------------------------------------------------- /example_app/app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/assets/stylesheets/application.css -------------------------------------------------------------------------------- /example_app/app/controllers/api/base_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/api/base_controller.rb -------------------------------------------------------------------------------- /example_app/app/controllers/api/v1/links_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/api/v1/links_controller.rb -------------------------------------------------------------------------------- /example_app/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/application_controller.rb -------------------------------------------------------------------------------- /example_app/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/app/controllers/downvotes_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/downvotes_controller.rb -------------------------------------------------------------------------------- /example_app/app/controllers/links_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/links_controller.rb -------------------------------------------------------------------------------- /example_app/app/controllers/new_links_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/new_links_controller.rb -------------------------------------------------------------------------------- /example_app/app/controllers/upvotes_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/controllers/upvotes_controller.rb -------------------------------------------------------------------------------- /example_app/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/helpers/application_helper.rb -------------------------------------------------------------------------------- /example_app/app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/mailers/application_mailer.rb -------------------------------------------------------------------------------- /example_app/app/mailers/link_mailer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/mailers/link_mailer.rb -------------------------------------------------------------------------------- /example_app/app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/app/models/link.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/models/link.rb -------------------------------------------------------------------------------- /example_app/app/models/score.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/models/score.rb -------------------------------------------------------------------------------- /example_app/app/serializers/link_serializer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/serializers/link_serializer.rb -------------------------------------------------------------------------------- /example_app/app/views/application/_error_messages.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/application/_error_messages.html.erb -------------------------------------------------------------------------------- /example_app/app/views/application/_navigation.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/application/_navigation.html.erb -------------------------------------------------------------------------------- /example_app/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/layouts/application.html.erb -------------------------------------------------------------------------------- /example_app/app/views/link_mailer/new_link.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/link_mailer/new_link.html.erb -------------------------------------------------------------------------------- /example_app/app/views/link_mailer/new_link.text.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/link_mailer/new_link.text.erb -------------------------------------------------------------------------------- /example_app/app/views/links/_link.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/links/_link.html.erb -------------------------------------------------------------------------------- /example_app/app/views/links/_link_list_item.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/links/_link_list_item.html.erb -------------------------------------------------------------------------------- /example_app/app/views/links/index.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/links/index.html.erb -------------------------------------------------------------------------------- /example_app/app/views/links/new.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/app/views/links/new.html.erb -------------------------------------------------------------------------------- /example_app/app/views/links/show.html.erb: -------------------------------------------------------------------------------- 1 | <%= render @link %> 2 | -------------------------------------------------------------------------------- /example_app/bin/bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/bin/bundle -------------------------------------------------------------------------------- /example_app/bin/rails: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/bin/rails -------------------------------------------------------------------------------- /example_app/bin/rake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/bin/rake -------------------------------------------------------------------------------- /example_app/bin/setup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/bin/setup -------------------------------------------------------------------------------- /example_app/bin/spring: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/bin/spring -------------------------------------------------------------------------------- /example_app/config.ru: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config.ru -------------------------------------------------------------------------------- /example_app/config/application.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/application.rb -------------------------------------------------------------------------------- /example_app/config/boot.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/boot.rb -------------------------------------------------------------------------------- /example_app/config/database.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/database.yml -------------------------------------------------------------------------------- /example_app/config/environment.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/environment.rb -------------------------------------------------------------------------------- /example_app/config/environments/development.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/environments/development.rb -------------------------------------------------------------------------------- /example_app/config/environments/production.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/environments/production.rb -------------------------------------------------------------------------------- /example_app/config/environments/test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/environments/test.rb -------------------------------------------------------------------------------- /example_app/config/initializers/assets.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/assets.rb -------------------------------------------------------------------------------- /example_app/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/backtrace_silencers.rb -------------------------------------------------------------------------------- /example_app/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/cookies_serializer.rb -------------------------------------------------------------------------------- /example_app/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/filter_parameter_logging.rb -------------------------------------------------------------------------------- /example_app/config/initializers/inflections.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/inflections.rb -------------------------------------------------------------------------------- /example_app/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/mime_types.rb -------------------------------------------------------------------------------- /example_app/config/initializers/session_store.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/session_store.rb -------------------------------------------------------------------------------- /example_app/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/initializers/wrap_parameters.rb -------------------------------------------------------------------------------- /example_app/config/locales/en.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/locales/en.yml -------------------------------------------------------------------------------- /example_app/config/routes.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/routes.rb -------------------------------------------------------------------------------- /example_app/config/secrets.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/config/secrets.yml -------------------------------------------------------------------------------- /example_app/db/migrate/20150408194827_create_links.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/db/migrate/20150408194827_create_links.rb -------------------------------------------------------------------------------- /example_app/db/migrate/20150504154305_add_upvotes_and_downvotes_to_links.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/db/migrate/20150504154305_add_upvotes_and_downvotes_to_links.rb -------------------------------------------------------------------------------- /example_app/db/schema.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/db/schema.rb -------------------------------------------------------------------------------- /example_app/db/seeds.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/db/seeds.rb -------------------------------------------------------------------------------- /example_app/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/public/404.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/public/404.html -------------------------------------------------------------------------------- /example_app/public/422.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/public/422.html -------------------------------------------------------------------------------- /example_app/public/500.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/public/500.html -------------------------------------------------------------------------------- /example_app/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/public/robots.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/public/robots.txt -------------------------------------------------------------------------------- /example_app/spec/controllers/links_controller_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/controllers/links_controller_spec.rb -------------------------------------------------------------------------------- /example_app/spec/factories.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/factories.rb -------------------------------------------------------------------------------- /example_app/spec/features/user_downvotes_a_link_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/features/user_downvotes_a_link_spec.rb -------------------------------------------------------------------------------- /example_app/spec/features/user_submits_a_link_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/features/user_submits_a_link_spec.rb -------------------------------------------------------------------------------- /example_app/spec/features/user_upvotes_a_link_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/features/user_upvotes_a_link_spec.rb -------------------------------------------------------------------------------- /example_app/spec/features/user_views_homepage_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/features/user_views_homepage_spec.rb -------------------------------------------------------------------------------- /example_app/spec/features/user_views_new_links_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/features/user_views_new_links_spec.rb -------------------------------------------------------------------------------- /example_app/spec/helpers/application_helper_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/helpers/application_helper_spec.rb -------------------------------------------------------------------------------- /example_app/spec/mailers/link_mailer_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/mailers/link_mailer_spec.rb -------------------------------------------------------------------------------- /example_app/spec/models/link_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/models/link_spec.rb -------------------------------------------------------------------------------- /example_app/spec/models/score_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/models/score_spec.rb -------------------------------------------------------------------------------- /example_app/spec/rails_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/rails_helper.rb -------------------------------------------------------------------------------- /example_app/spec/requests/api/v1/links_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/requests/api/v1/links_spec.rb -------------------------------------------------------------------------------- /example_app/spec/spec_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/spec_helper.rb -------------------------------------------------------------------------------- /example_app/spec/support/api_helpers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/support/api_helpers.rb -------------------------------------------------------------------------------- /example_app/spec/support/email_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/support/email_spec.rb -------------------------------------------------------------------------------- /example_app/spec/support/factory_girl.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/support/factory_girl.rb -------------------------------------------------------------------------------- /example_app/spec/views/links/_link.html.erb_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/views/links/_link.html.erb_spec.rb -------------------------------------------------------------------------------- /example_app/spec/views/links/show.html.erb_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/example_app/spec/views/links/show.html.erb_spec.rb -------------------------------------------------------------------------------- /example_app/vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example_app/vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /release/cover.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/cover.pdf -------------------------------------------------------------------------------- /release/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/cover.png -------------------------------------------------------------------------------- /release/images/cover.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/images/cover.pdf -------------------------------------------------------------------------------- /release/images/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/images/cover.png -------------------------------------------------------------------------------- /release/images/coverage-report-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/images/coverage-report-index.png -------------------------------------------------------------------------------- /release/images/coverage-report-show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/images/coverage-report-show.png -------------------------------------------------------------------------------- /release/images/rails-test-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/images/rails-test-types.png -------------------------------------------------------------------------------- /release/images/tdd-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/images/tdd-cycle.png -------------------------------------------------------------------------------- /release/tdd-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/tdd-cycle.png -------------------------------------------------------------------------------- /release/testing-rails.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/testing-rails.epub -------------------------------------------------------------------------------- /release/testing-rails.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/testing-rails.html -------------------------------------------------------------------------------- /release/testing-rails.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/testing-rails.md -------------------------------------------------------------------------------- /release/testing-rails.mobi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/testing-rails.mobi -------------------------------------------------------------------------------- /release/testing-rails.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/testing-rails.pdf -------------------------------------------------------------------------------- /release/testing-rails.toc.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thoughtbot/testing-rails/HEAD/release/testing-rails.toc.html --------------------------------------------------------------------------------