diff --git a/.rspec b/.rspec new file mode 100644 index 000000000..53607ea52 --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--colour diff --git a/Gemfile b/Gemfile index 26aaddd11..984d11790 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,8 @@ source 'http://rubygems.org' -gem 'rails', '3.0.3' +gem 'rails', '3.0.6' +gem 'yajl-ruby', :require => 'yajl' +gem 'nokogiri' gem 'bson_ext', '1.2.4' gem 'carrierwave' @@ -10,29 +12,19 @@ gem 'mini_magick' # gem 'rblog', :path => 'lib/rblog' gem 'mongoid', '2.0.0' -# Bundle edge Rails instead: -# gem 'rails', :git => 'git://github.com/rails/rails.git' - - -# Use unicorn as the web server -# gem 'unicorn' - -# Deploy with Capistrano -# gem 'capistrano' - # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) # gem 'ruby-debug' # gem 'ruby-debug19' -# Bundle the extra gems: -# gem 'bj' -# gem 'nokogiri' -# gem 'sqlite3-ruby', :require => 'sqlite3' -# gem 'aws-s3', :require => 'aws/s3' - -# Bundle gems for the local environment. Make sure to -# put test-only gems in this group so their generators -# and rake tasks are available in development mode: -# group :development, :test do -# gem 'webrat' -# end +group :test, :development do + gem "rspec", "~> 2.0" + gem "rspec-rails", "~> 2.0" + gem "factory_girl_rails" + gem "shoulda-matchers" + gem "rcov" + gem "delorean" + gem "watchr" + # gem "capybara" + # gem 'yard' + # gem "bluecloth" +end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 590a22798..edddc6868 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,32 +2,32 @@ GEM remote: http://rubygems.org/ specs: abstract (1.0.0) - actionmailer (3.0.3) - actionpack (= 3.0.3) - mail (~> 2.2.9) - actionpack (3.0.3) - activemodel (= 3.0.3) - activesupport (= 3.0.3) + actionmailer (3.0.6) + actionpack (= 3.0.6) + mail (~> 2.2.15) + actionpack (3.0.6) + activemodel (= 3.0.6) + activesupport (= 3.0.6) builder (~> 2.1.2) erubis (~> 2.6.6) - i18n (~> 0.4) + i18n (~> 0.5.0) rack (~> 1.2.1) - rack-mount (~> 0.6.13) - rack-test (~> 0.5.6) + rack-mount (~> 0.6.14) + rack-test (~> 0.5.7) tzinfo (~> 0.3.23) - activemodel (3.0.3) - activesupport (= 3.0.3) + activemodel (3.0.6) + activesupport (= 3.0.6) builder (~> 2.1.2) - i18n (~> 0.4) - activerecord (3.0.3) - activemodel (= 3.0.3) - activesupport (= 3.0.3) + i18n (~> 0.5.0) + activerecord (3.0.6) + activemodel (= 3.0.6) + activesupport (= 3.0.6) arel (~> 2.0.2) tzinfo (~> 0.3.23) - activeresource (3.0.3) - activemodel (= 3.0.3) - activesupport (= 3.0.3) - activesupport (3.0.3) + activeresource (3.0.6) + activemodel (= 3.0.6) + activesupport (= 3.0.6) + activesupport (3.0.6) arel (2.0.9) bcrypt-ruby (2.1.4) bson (1.3.0) @@ -35,12 +35,20 @@ GEM builder (2.1.2) carrierwave (0.5.3) activesupport (~> 3.0) + chronic (0.3.0) + delorean (1.0.0) + chronic devise (1.2.1) bcrypt-ruby (~> 2.1.2) orm_adapter (~> 0.0.3) warden (~> 1.0.3) + diff-lcs (1.1.2) erubis (2.6.6) abstract (>= 1.0.0) + factory_girl (1.3.3) + factory_girl_rails (1.0.1) + factory_girl (~> 1.3) + railties (>= 3.0.0) i18n (0.5.0) mail (2.2.15) activesupport (>= 2.3.6) @@ -57,6 +65,7 @@ GEM mongo (~> 1.2) tzinfo (~> 0.3.22) will_paginate (~> 3.0.pre) + nokogiri (1.4.4) orm_adapter (0.0.4) polyglot (0.3.1) rack (1.2.2) @@ -64,20 +73,35 @@ GEM rack (>= 1.0.0) rack-test (0.5.7) rack (>= 1.0) - rails (3.0.3) - actionmailer (= 3.0.3) - actionpack (= 3.0.3) - activerecord (= 3.0.3) - activeresource (= 3.0.3) - activesupport (= 3.0.3) + rails (3.0.6) + actionmailer (= 3.0.6) + actionpack (= 3.0.6) + activerecord (= 3.0.6) + activeresource (= 3.0.6) + activesupport (= 3.0.6) bundler (~> 1.0) - railties (= 3.0.3) - railties (3.0.3) - actionpack (= 3.0.3) - activesupport (= 3.0.3) + railties (= 3.0.6) + railties (3.0.6) + actionpack (= 3.0.6) + activesupport (= 3.0.6) rake (>= 0.8.7) thor (~> 0.14.4) rake (0.8.7) + rcov (0.9.9) + rspec (2.5.0) + rspec-core (~> 2.5.0) + rspec-expectations (~> 2.5.0) + rspec-mocks (~> 2.5.0) + rspec-core (2.5.1) + rspec-expectations (2.5.0) + diff-lcs (~> 1.1.2) + rspec-mocks (2.5.0) + rspec-rails (2.5.0) + actionpack (~> 3.0) + activesupport (~> 3.0) + railties (~> 3.0) + rspec (~> 2.5.0) + shoulda-matchers (1.0.0.beta2) subexec (0.0.4) thor (0.14.6) treetop (1.4.9) @@ -85,7 +109,9 @@ GEM tzinfo (0.3.26) warden (1.0.3) rack (>= 1.0.0) + watchr (0.7) will_paginate (3.0.pre2) + yajl-ruby (0.8.2) PLATFORMS ruby @@ -93,7 +119,16 @@ PLATFORMS DEPENDENCIES bson_ext (= 1.2.4) carrierwave + delorean devise + factory_girl_rails mini_magick mongoid (= 2.0.0) - rails (= 3.0.3) + nokogiri + rails (= 3.0.6) + rcov + rspec (~> 2.0) + rspec-rails (~> 2.0) + shoulda-matchers + watchr + yajl-ruby diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0ba147062..9b8b02c8f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,54 +1,27 @@ -# This file is copied to ~/spec when you run 'ruby script/generate rspec' -# from the project root directory. +# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' -require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment')) -require 'spec/autorun' -require 'spec/rails' +require File.expand_path("../../config/environment", __FILE__) +require 'rspec/rails' -# Uncomment the next line to use webrat's matchers -#require 'webrat/integrations/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} -# Requires supporting files with custom matchers and macros, etc, -# in ./support/ and its subdirectories. -Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f} - -Spec::Runner.configure do |config| - # If you're not using ActiveRecord you should remove these - # lines, delete config/database.yml and disable :active_record - # in your config/boot.rb - config.use_transactional_fixtures = true - config.use_instantiated_fixtures = false - config.fixture_path = RAILS_ROOT + '/spec/fixtures/' - - # == Fixtures - # - # You can declare fixtures for each example_group like this: - # describe "...." do - # fixtures :table_a, :table_b - # - # Alternatively, if you prefer to declare them only once, you can - # do so right here. Just uncomment the next line and replace the fixture - # names with your fixtures. - # - # config.global_fixtures = :table_a, :table_b - # - # If you declare global fixtures, be aware that they will be declared - # for all of your examples, even those that don't use them. - # - # You can also declare which fixtures to use (for example fixtures for test/fixtures): - # - # config.fixture_path = RAILS_ROOT + '/spec/fixtures/' - # +RSpec.configure do |config| # == Mock Framework # - # RSpec uses it's own mocking framework by default. If you prefer to - # use mocha, flexmock or RR, uncomment the appropriate line: + # 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 - # - # == Notes - # - # For more information take a look at Spec::Runner::Configuration and Spec::Runner + 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 diff --git a/test/fixtures/sites.yml b/test/fixtures/sites.yml deleted file mode 100644 index 289334110..000000000 --- a/test/fixtures/sites.yml +++ /dev/null @@ -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 diff --git a/test/functional/sites_controller_test.rb b/test/functional/sites_controller_test.rb deleted file mode 100644 index 361920b7c..000000000 --- a/test/functional/sites_controller_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'test_helper' - -class SitesControllerTest < ActionController::TestCase - # Replace this with your real tests. - test "the truth" do - assert true - end -end diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb deleted file mode 100644 index 867fc8c98..000000000 --- a/test/performance/browsing_test.rb +++ /dev/null @@ -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 diff --git a/test/test_helper.rb b/test/test_helper.rb deleted file mode 100644 index 829851772..000000000 --- a/test/test_helper.rb +++ /dev/null @@ -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 diff --git a/test/unit/helpers/sites_helper_test.rb b/test/unit/helpers/sites_helper_test.rb deleted file mode 100644 index 0e92edf74..000000000 --- a/test/unit/helpers/sites_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class SitesHelperTest < ActionView::TestCase -end diff --git a/test/unit/site_test.rb b/test/unit/site_test.rb deleted file mode 100644 index f7cf95d2c..000000000 --- a/test/unit/site_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'test_helper' - -class SiteTest < ActiveSupport::TestCase - # Replace this with your real tests. - test "the truth" do - assert true - end -end