clean code + rspec works smoothly now
This commit is contained in:
parent
4e16509531
commit
ff6fcf43f1
13
Gemfile
13
Gemfile
@ -7,7 +7,7 @@ gem "rails", "3.0.0.beta2"
|
|||||||
gem "liquid"
|
gem "liquid"
|
||||||
gem "bson_ext"
|
gem "bson_ext"
|
||||||
gem "mongo_ext"
|
gem "mongo_ext"
|
||||||
gem "mongoid", ">= 2.0.0.beta"
|
gem "mongoid", ">= 2.0.0.beta2"
|
||||||
gem "warden"
|
gem "warden"
|
||||||
gem "devise", ">= 1.1.rc0"
|
gem "devise", ">= 1.1.rc0"
|
||||||
|
|
||||||
@ -22,13 +22,6 @@ group :development do
|
|||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'rspec-rails', '>= 2.0.0.beta.4'
|
gem 'rspec-rails', '>= 2.0.0.beta.5'
|
||||||
|
gem 'factory_girl', :git => 'git://github.com/thoughtbot/factory_girl.git', :branch => 'rails3'
|
||||||
end
|
end
|
||||||
|
|
||||||
# gem 'rspec', '>= 2.0.0.beta.4'
|
|
||||||
# gem 'rspec-rails', '>= 2.0.0.beta.4'
|
|
||||||
gem 'factory_girl', :git => 'git://github.com/thoughtbot/factory_girl.git', :branch => 'rails3'
|
|
||||||
|
|
||||||
|
|
||||||
# gem "shoulda", :git => "git://github.com/sinefunc/shoulda.git", :branch => "rails3"
|
|
||||||
# gem "shoulda", :git => "git://github.com/bmaddy/shoulda.git", :branch => "rails3", :require => nil
|
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
begin
|
begin
|
||||||
require "rubygems"
|
|
||||||
require "bundler"
|
|
||||||
|
|
||||||
Bundler.require :default, :test
|
|
||||||
|
|
||||||
require 'rspec/core'
|
require 'rspec/core'
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
rescue MissingSourceFile
|
rescue MissingSourceFile
|
||||||
@ -33,7 +28,7 @@ end
|
|||||||
|
|
||||||
Rake.application.instance_variable_get('@tasks').delete('default')
|
Rake.application.instance_variable_get('@tasks').delete('default')
|
||||||
|
|
||||||
spec_prereq = :noop #File.exist?(File.join(Rails.root, 'config', 'database.yml')) ? "db:test:prepare" : :noop
|
spec_prereq = :noop # we are using mongoid and not ActiveRecord, no need to prepare the test database
|
||||||
task :noop do
|
task :noop do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,16 +9,9 @@ require 'rspec/rails'
|
|||||||
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
||||||
|
|
||||||
Rspec.configure do |config|
|
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
|
config.mock_with :rspec
|
||||||
|
|
||||||
# If you'd prefer not to run each of your examples within a transaction,
|
config.before(:each) do
|
||||||
# uncomment the following line.
|
Mongoid.master.collections.each(&:drop)
|
||||||
# config.use_transactional_examples false
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user