Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 36f56e32b29759c4cfc80697358e25bbbecdf902 1 parent 3b5a837
@infovore authored
Showing with 33 additions and 196 deletions.
  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
View
1  .rspec
@@ -0,0 +1 @@
+--colour
View
32 spec/spec_helper.rb
@@ -0,0 +1,32 @@
+# 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'
+require 'rspec/autorun'
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+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
+
+ # If true, the base class of anonymous controllers will be inferred
+ # automatically. This will be the default behavior in future versions of
+ # rspec-rails.
+ config.infer_base_class_for_anonymous_controllers = false
+end
View
11 test/fixtures/authors.yml
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/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
View
11 test/fixtures/books.yml
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/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
View
11 test/fixtures/clippings.yml
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/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
View
11 test/fixtures/imports.yml
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/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
View
11 test/fixtures/instapaper_references.yml
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/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
View
11 test/fixtures/notes.yml
@@ -1,11 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/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
View
8 test/functional/authors_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class AuthorsControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/functional/books_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class BooksControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/functional/clippings_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class ClippingsControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/functional/exports_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class ExportsControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/functional/imports_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class ImportsControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
9 test/performance/browsing_test.rb
@@ -1,9 +0,0 @@
-require 'test_helper'
-require 'rails/performance_test_help'
-
-# Profiling results for each test method are written to tmp/performance.
-class BrowsingTest < ActionDispatch::PerformanceTest
- def test_homepage
- get '/'
- end
-end
View
13 test/test_helper.rb
@@ -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
View
8 test/unit/author_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class AuthorTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/unit/book_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class BookTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/unit/clipping_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class ClippingTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
4 test/unit/helpers/authors_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class AuthorsHelperTest < ActionView::TestCase
-end
View
4 test/unit/helpers/books_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class BooksHelperTest < ActionView::TestCase
-end
View
4 test/unit/helpers/clippings_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class ClippingsHelperTest < ActionView::TestCase
-end
View
4 test/unit/helpers/exports_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class ExportsHelperTest < ActionView::TestCase
-end
View
4 test/unit/helpers/imports_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class ImportsHelperTest < ActionView::TestCase
-end
View
8 test/unit/import_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class ImportTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/unit/instapaper_reference_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class InstapaperReferenceTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/unit/note_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class NoteTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.