Skip to content
Browse files

use rspec

  • Loading branch information...
1 parent 62303dd commit 08d0e4913bbc09d9ffff47d0d248642066cc2462 @Caged committed Oct 17, 2010
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
5 Gemfile
@@ -16,9 +16,14 @@ gem 'closure-compiler'
gem 'proj4rb', :git => 'git://github.com/Caged/proj4rb.git'
group :development do
+ gem 'rspec-rails', '2.0.1'
gem 'rails3-generators'
gem 'jquery-rails'
end
+
+group :test do
+ gem 'rspec', '2.0.0'
+end
# Use unicorn as the web server
# gem 'unicorn'
View
15 Gemfile.lock
@@ -50,6 +50,7 @@ GEM
bson_ext (1.1.1)
builder (2.1.2)
closure-compiler (0.3.3)
+ diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
hirb (0.3.4)
@@ -90,6 +91,18 @@ GEM
rake (>= 0.8.4)
thor (~> 0.14.0)
rake (0.8.7)
+ rspec (2.0.0)
+ rspec-core (= 2.0.0)
+ rspec-expectations (= 2.0.0)
+ rspec-mocks (= 2.0.0)
+ rspec-core (2.0.0)
+ rspec-expectations (2.0.0)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.0)
+ rspec-core (= 2.0.0)
+ rspec-expectations (= 2.0.0)
+ rspec-rails (2.0.1)
+ rspec (~> 2.0.0)
thor (0.14.3)
treetop (1.4.8)
polyglot (>= 0.3.1)
@@ -111,5 +124,7 @@ DEPENDENCIES
proj4rb!
rails (= 3.0.0)
rails3-generators
+ rspec (= 2.0.0)
+ rspec-rails (= 2.0.1)
wirble
yui-compressor
View
2 autotest/discover.rb
@@ -0,0 +1,2 @@
+Autotest.add_discovery { "rails" }
+Autotest.add_discovery { "rspec2" }
View
27 spec/spec_helper.rb
@@ -0,0 +1,27 @@
+# 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.
+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
+ config.mock_with :rspec
+
+ # 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
+end
View
8 test/functional/crimes_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class CrimesControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/functional/neighborhoods_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class NeighborhoodsControllerTest < ActionController::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
View
8 test/functional/offenses_controller_test.rb
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class OffensesControllerTest < 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
7 test/test_helper.rb
@@ -1,7 +0,0 @@
-ENV["RAILS_ENV"] = "test"
-require File.expand_path('../../config/environment', __FILE__)
-require 'rails/test_help'
-
-class ActiveSupport::TestCase
- # Add more helper methods to be used by all tests here...
-end
View
4 test/unit/helpers/crimes_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class CrimesHelperTest < ActionView::TestCase
-end
View
4 test/unit/helpers/neighborhoods_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class NeighborhoodsHelperTest < ActionView::TestCase
-end
View
4 test/unit/helpers/offenses_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class OffensesHelperTest < ActionView::TestCase
-end

0 comments on commit 08d0e49

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