Post Image
By Matt GaidicaJune 20, 2012In Uncategorized

rspec_helper.rb for Rspec in Ruby

require File.join(File.dirname(__FILE__), '..', 'app.rb')
require 'rack/test'

set :environment, :test
set :run, false
set :raise_errors, true
set :logging, false

def access_token
  "xxxxx"
end

def api_token
  "xxxxx"
end

def app
  Sinatra::Application
end

RSpec.configure do |config|
  config.include Rack::Test::Methods
end

#no database debug messages
ActiveRecord::Base.logger.level = Logger::INFO
svgA Better time_ago_in_words for Ruby on Rails
svg
svgString to Boolean in Ruby