Created
March 26, 2013 16:12
-
-
Save nandosola/5246704 to your computer and use it in GitHub Desktop.
Ejemplo para RSpec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'sinatra', '1.3.6' | |
gem 'json', '1.7.7' | |
gem 'haml', '3.1.7' | |
gem 'mongoid', '3.1.2' | |
gem 'bcrypt-ruby', '3.0.1' | |
gem 'rest-client', '1.6.7' | |
gem 'stringex', '1.5.1' | |
gem 'vlad', :require => false | |
gem 'vlad-hg', :require => false | |
# Include when vlad's jruby support is fixed | |
#gem 'torquebox-rake-support', '2.3.0', :require => false | |
group :test do | |
gem 'ci_reporter' | |
gem 'rspec' | |
gem 'rack-test' | |
end |
Y éste spec/spec_base.rb
# encoding: utf-8
require 'rspec'
require 'rack/test'
require 'yaml'
ENV['RACK_ENV'] ||= 'test'
CONFIG = YAML.load_file(File.join('config', 'settings.yml'))[ENV['RACK_ENV']]
APP_ROOT = File.join(File.dirname(__FILE__), '..')
CONFIG.freeze; APP_ROOT.freeze
RSpec.configure do |conf|
conf.include Rack::Test::Methods
end
Dir[ "#{File.dirname(__FILE__)}/*_spec.rb" ].each do |path|
require path
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Este sería el Rakefile