From ad1121ffb0dd5a9334bea6e4822fcf78064a5c1e Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 8 Apr 2014 18:28:17 +0200 Subject: [PATCH] Remote the unused minitest suite, switch to rspec --- Gemfile | 7 +--- Gemfile.lock | 31 ++++++++++------ spec/spec_helper.rb | 37 +++++++++++++++++++ test/fixtures/.gitkeep | 0 test/fixtures/users.yml | 11 ------ test/functional/.gitkeep | 0 .../functional/admin/admin_controller_test.rb | 7 ---- .../admin/call_for_papers_controller_test.rb | 7 ---- .../admin/conference_controller_test.rb | 7 ---- .../admin/people_controller_test.rb | 7 ---- .../functional/admin/users_controller_test.rb | 7 ---- .../functional/admin/venue_controller_test.rb | 7 ---- test/functional/home_controller_test.rb | 7 ---- test/functional/mailbot_test.rb | 7 ---- test/integration/.gitkeep | 0 test/performance/browsing_test.rb | 12 ------ test/test_helper.rb | 13 ------- test/unit/.gitkeep | 0 test/unit/helpers/admin/admin_helper_test.rb | 4 -- .../admin/call_for_papers_helper_test.rb | 4 -- .../helpers/admin/conference_helper_test.rb | 4 -- test/unit/helpers/admin/people_helper_test.rb | 4 -- test/unit/helpers/admin/users_helper_test.rb | 4 -- test/unit/helpers/admin/venue_helper_test.rb | 4 -- test/unit/helpers/home_helper_test.rb | 4 -- test/unit/user_test.rb | 7 ---- 26 files changed, 58 insertions(+), 144 deletions(-) create mode 100644 spec/spec_helper.rb delete mode 100644 test/fixtures/.gitkeep delete mode 100644 test/fixtures/users.yml delete mode 100644 test/functional/.gitkeep delete mode 100644 test/functional/admin/admin_controller_test.rb delete mode 100644 test/functional/admin/call_for_papers_controller_test.rb delete mode 100644 test/functional/admin/conference_controller_test.rb delete mode 100644 test/functional/admin/people_controller_test.rb delete mode 100644 test/functional/admin/users_controller_test.rb delete mode 100644 test/functional/admin/venue_controller_test.rb delete mode 100644 test/functional/home_controller_test.rb delete mode 100644 test/functional/mailbot_test.rb delete mode 100644 test/integration/.gitkeep delete mode 100644 test/performance/browsing_test.rb delete mode 100644 test/test_helper.rb delete mode 100644 test/unit/.gitkeep delete mode 100644 test/unit/helpers/admin/admin_helper_test.rb delete mode 100644 test/unit/helpers/admin/call_for_papers_helper_test.rb delete mode 100644 test/unit/helpers/admin/conference_helper_test.rb delete mode 100644 test/unit/helpers/admin/people_helper_test.rb delete mode 100644 test/unit/helpers/admin/users_helper_test.rb delete mode 100644 test/unit/helpers/admin/venue_helper_test.rb delete mode 100644 test/unit/helpers/home_helper_test.rb delete mode 100644 test/unit/user_test.rb diff --git a/Gemfile b/Gemfile index 89ac4324..7c86ee22 100644 --- a/Gemfile +++ b/Gemfile @@ -21,15 +21,12 @@ group :development, :test do gem 'sqlite3' gem 'thin' gem 'letter_opener' + gem 'rspec-rails', '~> 3.0.0.beta' + gem 'capybara', '1.1.2' end group :production do gem 'mysql2' - gem 'rspec-rails', '2.11.0' -end - -group :test do - gem 'capybara', '1.1.2' end gem 'will_paginate' diff --git a/Gemfile.lock b/Gemfile.lock index ece99731..a7c1b234 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,7 +76,7 @@ GEM railties (>= 3.2.6, < 5) thread_safe (~> 0.1) warden (~> 1.2.3) - diff-lcs (1.1.3) + diff-lcs (1.2.5) erubis (2.7.0) eventmachine (1.0.3) execjs (2.0.2) @@ -163,19 +163,26 @@ GEM rdoc (3.12.2) json (~> 1.4) ref (1.0.5) - rspec (2.11.0) - rspec-core (~> 2.11.0) - rspec-expectations (~> 2.11.0) - rspec-mocks (~> 2.11.0) - rspec-core (2.11.1) - rspec-expectations (2.11.3) - diff-lcs (~> 1.1.3) - rspec-mocks (2.11.3) - rspec-rails (2.11.0) + rspec-collection_matchers (0.0.3) + rspec-expectations (>= 2.99.0.beta1) + rspec-core (3.0.0.beta2) + rspec-support (= 3.0.0.beta2) + rspec-expectations (3.0.0.beta2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (= 3.0.0.beta2) + rspec-mocks (3.0.0.beta2) + rspec-support (= 3.0.0.beta2) + rspec-rails (3.0.0.beta2) actionpack (>= 3.0) + activemodel (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec (~> 2.11.0) + rspec-collection_matchers + rspec-core (= 3.0.0.beta2) + rspec-expectations (= 3.0.0.beta2) + rspec-mocks (= 3.0.0.beta2) + rspec-support (= 3.0.0.beta2) + rspec-support (3.0.0.beta2) rubyzip (1.0.0) sass (3.2.14) sass-rails (3.2.6) @@ -249,7 +256,7 @@ DEPENDENCIES prawn_rails pry rails (= 3.2.17) - rspec-rails (= 2.11.0) + rspec-rails (~> 3.0.0.beta) sass-rails (>= 3.2) sqlite3 therubyracer diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 00000000..202b40eb --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,37 @@ +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV["RAILS_ENV"] ||= 'test' +require File.expand_path("../../config/environment", __FILE__) +require 'rspec/rails' + +# Requires supporting ruby files with custom matchers and macros, etc, in +# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are +# run as spec files by default. This means that files in spec/support that end +# in _spec.rb will both be required and run as specs, causing the specs to be +# run twice. It is recommended that you do not name files matching this glob to +# end with _spec.rb. You can configure this pattern with with the --pattern +# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } + +RSpec.configure do |config| + # ## Mock Framework + # + # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: + # + # config.mock_with :mocha + # config.mock_with :flexmock + # config.mock_with :rr + + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + config.fixture_path = "#{::Rails.root}/spec/fixtures" + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = "random" +end diff --git a/test/fixtures/.gitkeep b/test/fixtures/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml deleted file mode 100644 index c63aac0b..00000000 --- a/test/fixtures/users.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value diff --git a/test/functional/.gitkeep b/test/functional/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/admin/admin_controller_test.rb b/test/functional/admin/admin_controller_test.rb deleted file mode 100644 index d32ccbb4..00000000 --- a/test/functional/admin/admin_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class Admin::AdminControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/admin/call_for_papers_controller_test.rb b/test/functional/admin/call_for_papers_controller_test.rb deleted file mode 100644 index b5813002..00000000 --- a/test/functional/admin/call_for_papers_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class Admin::CallForPapersControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/admin/conference_controller_test.rb b/test/functional/admin/conference_controller_test.rb deleted file mode 100644 index 6d747263..00000000 --- a/test/functional/admin/conference_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class Admin::ConferenceControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/admin/people_controller_test.rb b/test/functional/admin/people_controller_test.rb deleted file mode 100644 index 4c520217..00000000 --- a/test/functional/admin/people_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class Admin::PeopleControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/admin/users_controller_test.rb b/test/functional/admin/users_controller_test.rb deleted file mode 100644 index a0352fc3..00000000 --- a/test/functional/admin/users_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class Admin::UsersControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/admin/venue_controller_test.rb b/test/functional/admin/venue_controller_test.rb deleted file mode 100644 index 27cf2b3f..00000000 --- a/test/functional/admin/venue_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class Admin::VenueControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/home_controller_test.rb b/test/functional/home_controller_test.rb deleted file mode 100644 index 730478d3..00000000 --- a/test/functional/home_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class HomeControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/functional/mailbot_test.rb b/test/functional/mailbot_test.rb deleted file mode 100644 index 94e659b5..00000000 --- a/test/functional/mailbot_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class MailbotTest < ActionMailer::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/integration/.gitkeep b/test/integration/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb deleted file mode 100644 index 3fea27b9..00000000 --- a/test/performance/browsing_test.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'test_helper' -require 'rails/performance_test_help' - -class BrowsingTest < ActionDispatch::PerformanceTest - # Refer to the documentation for all available options - # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] - # :output => 'tmp/performance', :formats => [:flat] } - - def test_homepage - get '/' - end -end diff --git a/test/test_helper.rb b/test/test_helper.rb deleted file mode 100644 index 8bf1192f..00000000 --- a/test/test_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -ENV["RAILS_ENV"] = "test" -require File.expand_path('../../config/environment', __FILE__) -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. - # - # Note: You'll currently still have to declare fixtures explicitly in integration tests - # -- they do not yet inherit this setting - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/test/unit/.gitkeep b/test/unit/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/test/unit/helpers/admin/admin_helper_test.rb b/test/unit/helpers/admin/admin_helper_test.rb deleted file mode 100644 index 28ed1295..00000000 --- a/test/unit/helpers/admin/admin_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Admin::AdminHelperTest < ActionView::TestCase -end diff --git a/test/unit/helpers/admin/call_for_papers_helper_test.rb b/test/unit/helpers/admin/call_for_papers_helper_test.rb deleted file mode 100644 index 574a32ef..00000000 --- a/test/unit/helpers/admin/call_for_papers_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Admin::CallForPapersHelperTest < ActionView::TestCase -end diff --git a/test/unit/helpers/admin/conference_helper_test.rb b/test/unit/helpers/admin/conference_helper_test.rb deleted file mode 100644 index 160d5807..00000000 --- a/test/unit/helpers/admin/conference_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Admin::ConferenceHelperTest < ActionView::TestCase -end diff --git a/test/unit/helpers/admin/people_helper_test.rb b/test/unit/helpers/admin/people_helper_test.rb deleted file mode 100644 index 0e8779cb..00000000 --- a/test/unit/helpers/admin/people_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Admin::PeopleHelperTest < ActionView::TestCase -end diff --git a/test/unit/helpers/admin/users_helper_test.rb b/test/unit/helpers/admin/users_helper_test.rb deleted file mode 100644 index 1b59e3d9..00000000 --- a/test/unit/helpers/admin/users_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Admin::UsersHelperTest < ActionView::TestCase -end diff --git a/test/unit/helpers/admin/venue_helper_test.rb b/test/unit/helpers/admin/venue_helper_test.rb deleted file mode 100644 index fbfcfd03..00000000 --- a/test/unit/helpers/admin/venue_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Admin::VenueHelperTest < ActionView::TestCase -end diff --git a/test/unit/helpers/home_helper_test.rb b/test/unit/helpers/home_helper_test.rb deleted file mode 100644 index 4740a18d..00000000 --- a/test/unit/helpers/home_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class HomeHelperTest < ActionView::TestCase -end diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb deleted file mode 100644 index 82f61e01..00000000 --- a/test/unit/user_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class UserTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end