Permalink
Browse files

Set up testing environment

[#9690717]
  • Loading branch information...
1 parent c2881a2 commit 0a77b5c7563416c6e4d44b921b2c6cdc22379530 @luigi luigi committed Feb 10, 2011
Showing with 43 additions and 5 deletions.
  1. +1 −0 .rspec
  2. +6 −5 Gemfile
  3. +9 −0 Gemfile.lock
  4. +3 −0 spec/acceptance/acceptance_helper.rb
  5. +5 −0 spec/acceptance/support/helpers.rb
  6. +9 −0 spec/acceptance/support/paths.rb
  7. +10 −0 spec/spec_helper.rb
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
11 Gemfile
@@ -9,9 +9,10 @@ gem 'mongoid', '~> 2.0.0.rc'
gem 'bson_ext', '~> 1.2'
group :development, :test do
- gem 'rspec-rails', '~> 2.5'
- gem 'rr', '~> 1.0'
- gem 'steak', '~> 1.1'
- gem 'capybara', '~> 0.4'
- gem 'akephalos', '~> 0.2'
+ gem 'rspec-rails', '~> 2.5'
+ gem 'rr', '~> 1.0'
+ gem 'steak', '~> 1.1'
+ gem 'capybara', '~> 0.4'
+ gem 'akephalos', '~> 0.2'
+ gem 'mongoid-rspec', :git => 'git://github.com/juno/mongoid-rspec.git'
end
View
@@ -1,3 +1,11 @@
+GIT
+ remote: git://github.com/juno/mongoid-rspec.git
+ revision: 6f3b83271ad1fc429bb5f03fb4a36156892f4d31
+ specs:
+ mongoid-rspec (1.3.2)
+ mongoid (~> 2.0.0.rc.7)
+ rspec (~> 2)
+
GEM
remote: http://rubygems.org/
specs:
@@ -165,6 +173,7 @@ DEPENDENCIES
capybara (~> 0.4)
jquery-rails (~> 0.2)
mongoid (~> 2.0.0.rc)
+ mongoid-rspec!
rails (~> 3.0)
rr (~> 1.0)
rspec-rails (~> 2.5)
@@ -0,0 +1,3 @@
+require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
+require "steak"
+Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
@@ -0,0 +1,5 @@
+module HelperMethods
+ # Put helper methods you need to be available in all tests here.
+end
+
+RSpec.configuration.include HelperMethods, :type => :acceptance
@@ -0,0 +1,9 @@
+module NavigationHelpers
+ # Put helper methods related to the paths in your application here.
+
+ def homepage
+ "/"
+ end
+end
+
+RSpec.configuration.include NavigationHelpers, :type => :acceptance
View
@@ -0,0 +1,10 @@
+ENV["RAILS_ENV"] ||= 'test'
+require File.expand_path("../../config/environment", __FILE__)
+require 'rspec/rails'
+
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+ config.include Mongoid::Matchers
+ config.mock_with :rr
+end

0 comments on commit 0a77b5c

Please sign in to comment.