Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removing test_unit, adding rspec. Lots of specs to add, then.

  • Loading branch information...
commit 36f56e32b29759c4cfc80697358e25bbbecdf902 1 parent 3b5a837
Tom Armitage authored

Showing 26 changed files with 33 additions and 196 deletions. Show diff stats Hide diff stats

  1. +1 0  .rspec
  2. +32 0 spec/spec_helper.rb
  3. +0 11 test/fixtures/authors.yml
  4. +0 11 test/fixtures/books.yml
  5. +0 11 test/fixtures/clippings.yml
  6. +0 11 test/fixtures/imports.yml
  7. +0 11 test/fixtures/instapaper_references.yml
  8. +0 11 test/fixtures/notes.yml
  9. +0 8 test/functional/authors_controller_test.rb
  10. +0 8 test/functional/books_controller_test.rb
  11. +0 8 test/functional/clippings_controller_test.rb
  12. +0 8 test/functional/exports_controller_test.rb
  13. +0 8 test/functional/imports_controller_test.rb
  14. +0 9 test/performance/browsing_test.rb
  15. +0 13 test/test_helper.rb
  16. +0 8 test/unit/author_test.rb
  17. +0 8 test/unit/book_test.rb
  18. +0 8 test/unit/clipping_test.rb
  19. +0 4 test/unit/helpers/authors_helper_test.rb
  20. +0 4 test/unit/helpers/books_helper_test.rb
  21. +0 4 test/unit/helpers/clippings_helper_test.rb
  22. +0 4 test/unit/helpers/exports_helper_test.rb
  23. +0 4 test/unit/helpers/imports_helper_test.rb
  24. +0 8 test/unit/import_test.rb
  25. +0 8 test/unit/instapaper_reference_test.rb
  26. +0 8 test/unit/note_test.rb
1  .rspec
... ... @@ -0,0 +1 @@
  1 +--colour
32 spec/spec_helper.rb
... ... @@ -0,0 +1,32 @@
  1 +# This file is copied to spec/ when you run 'rails generate rspec:install'
  2 +ENV["RAILS_ENV"] ||= 'test'
  3 +require File.expand_path("../../config/environment", __FILE__)
  4 +require 'rspec/rails'
  5 +require 'rspec/autorun'
  6 +
  7 +# Requires supporting ruby files with custom matchers and macros, etc,
  8 +# in spec/support/ and its subdirectories.
  9 +Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
  10 +
  11 +RSpec.configure do |config|
  12 + # ## Mock Framework
  13 + #
  14 + # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
  15 + #
  16 + # config.mock_with :mocha
  17 + # config.mock_with :flexmock
  18 + # config.mock_with :rr
  19 +
  20 + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
  21 + config.fixture_path = "#{::Rails.root}/spec/fixtures"
  22 +
  23 + # If you're not using ActiveRecord, or you'd prefer not to run each of your
  24 + # examples within a transaction, remove the following line or assign false
  25 + # instead of true.
  26 + config.use_transactional_fixtures = true
  27 +
  28 + # If true, the base class of anonymous controllers will be inferred
  29 + # automatically. This will be the default behavior in future versions of
  30 + # rspec-rails.
  31 + config.infer_base_class_for_anonymous_controllers = false
  32 +end
11 test/fixtures/authors.yml
... ... @@ -1,11 +0,0 @@
1   -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2   -
3   -# This model initially had no columns defined. If you add columns to the
4   -# model remove the '{}' from the fixture names and add the columns immediately
5   -# below each fixture, per the syntax in the comments below
6   -#
7   -one: {}
8   -# column: value
9   -#
10   -two: {}
11   -# column: value
11 test/fixtures/books.yml
... ... @@ -1,11 +0,0 @@
1   -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2   -
3   -# This model initially had no columns defined. If you add columns to the
4   -# model remove the '{}' from the fixture names and add the columns immediately
5   -# below each fixture, per the syntax in the comments below
6   -#
7   -one: {}
8   -# column: value
9   -#
10   -two: {}
11   -# column: value
11 test/fixtures/clippings.yml
... ... @@ -1,11 +0,0 @@
1   -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2   -
3   -# This model initially had no columns defined. If you add columns to the
4   -# model remove the '{}' from the fixture names and add the columns immediately
5   -# below each fixture, per the syntax in the comments below
6   -#
7   -one: {}
8   -# column: value
9   -#
10   -two: {}
11   -# column: value
11 test/fixtures/imports.yml
... ... @@ -1,11 +0,0 @@
1   -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2   -
3   -# This model initially had no columns defined. If you add columns to the
4   -# model remove the '{}' from the fixture names and add the columns immediately
5   -# below each fixture, per the syntax in the comments below
6   -#
7   -one: {}
8   -# column: value
9   -#
10   -two: {}
11   -# column: value
11 test/fixtures/instapaper_references.yml
... ... @@ -1,11 +0,0 @@
1   -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2   -
3   -# This model initially had no columns defined. If you add columns to the
4   -# model remove the '{}' from the fixture names and add the columns immediately
5   -# below each fixture, per the syntax in the comments below
6   -#
7   -one: {}
8   -# column: value
9   -#
10   -two: {}
11   -# column: value
11 test/fixtures/notes.yml
... ... @@ -1,11 +0,0 @@
1   -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2   -
3   -# This model initially had no columns defined. If you add columns to the
4   -# model remove the '{}' from the fixture names and add the columns immediately
5   -# below each fixture, per the syntax in the comments below
6   -#
7   -one: {}
8   -# column: value
9   -#
10   -two: {}
11   -# column: value
8 test/functional/authors_controller_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class AuthorsControllerTest < ActionController::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/functional/books_controller_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class BooksControllerTest < ActionController::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/functional/clippings_controller_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ClippingsControllerTest < ActionController::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/functional/exports_controller_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ExportsControllerTest < ActionController::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/functional/imports_controller_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ImportsControllerTest < ActionController::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
9 test/performance/browsing_test.rb
... ... @@ -1,9 +0,0 @@
1   -require 'test_helper'
2   -require 'rails/performance_test_help'
3   -
4   -# Profiling results for each test method are written to tmp/performance.
5   -class BrowsingTest < ActionDispatch::PerformanceTest
6   - def test_homepage
7   - get '/'
8   - end
9   -end
13 test/test_helper.rb
... ... @@ -1,13 +0,0 @@
1   -ENV["RAILS_ENV"] = "test"
2   -require File.expand_path('../../config/environment', __FILE__)
3   -require 'rails/test_help'
4   -
5   -class ActiveSupport::TestCase
6   - # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7   - #
8   - # Note: You'll currently still have to declare fixtures explicitly in integration tests
9   - # -- they do not yet inherit this setting
10   - fixtures :all
11   -
12   - # Add more helper methods to be used by all tests here...
13   -end
8 test/unit/author_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class AuthorTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/unit/book_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class BookTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/unit/clipping_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ClippingTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
4 test/unit/helpers/authors_helper_test.rb
... ... @@ -1,4 +0,0 @@
1   -require 'test_helper'
2   -
3   -class AuthorsHelperTest < ActionView::TestCase
4   -end
4 test/unit/helpers/books_helper_test.rb
... ... @@ -1,4 +0,0 @@
1   -require 'test_helper'
2   -
3   -class BooksHelperTest < ActionView::TestCase
4   -end
4 test/unit/helpers/clippings_helper_test.rb
... ... @@ -1,4 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ClippingsHelperTest < ActionView::TestCase
4   -end
4 test/unit/helpers/exports_helper_test.rb
... ... @@ -1,4 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ExportsHelperTest < ActionView::TestCase
4   -end
4 test/unit/helpers/imports_helper_test.rb
... ... @@ -1,4 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ImportsHelperTest < ActionView::TestCase
4   -end
8 test/unit/import_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class ImportTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/unit/instapaper_reference_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class InstapaperReferenceTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
8 test/unit/note_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class NoteTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end

0 comments on commit 36f56e3

Please sign in to comment.
Something went wrong with that request. Please try again.