Sha256: b67bd9c578c67c8b97ae10024166adf7340dc752e4f2a529bf81f21682766fdc

Contents?: true

Size: 1.9 KB

Versions: 15

Compression:

Stored size: 1.9 KB

Contents

require 'rubygems'
gem 'test-unit'
require 'test/unit'
require 'mocha'
gem 'activesupport', '< 3.0.0'
require 'active_support'
require 'active_support/test_case'
gem 'activerecord', '< 3.0.0'
require 'active_record'
gem 'actionpack', '< 3.0.0'
require 'actionpack'
require 'action_controller'
require 'shoulda'
require 'shoulda/action_controller'
require 'shoulda/action_controller/macros'
require 'shoulda/action_controller/matchers'
require File.join(File.dirname(__FILE__), "..", 'lib', 'twilio_contactable')

# default test configuration
TwilioContactable.configure do |config|
  config.client_id  = '1'
  config.client_key = 'ABCDEF'
  config.website_address = 'http://example.com'
  config.default_from_phone_number = '1 (206) 867-5309'
end

TwilioContactable.mode = :test
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
require 'logger'
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite3'])

ActiveRecord::Schema.define(:version => 1) do
  create_table :users do |t|
    t.column :phone_number,                 :string
    t.column :formatted_phone_number,       :string
    t.column :sms_blocked,                  :boolean
    t.column :sms_confirmation_code,        :string
    t.column :sms_confirmation_attempted,   :datetime
    t.column :sms_confirmed_phone_number,   :string
    t.column :voice_blocked,                :boolean
    t.column :voice_confirmation_code,      :string
    t.column :voice_confirmation_attempted, :datetime
    t.column :voice_confirmed_phone_number, :string

    t.column :custom_column,                :string

    t.column :type, :string
  end
end

class User < ActiveRecord::Base
  include TwilioContactable::Contactable
end

# kill all network access
module TwilioContactable
  module Gateway
    def post
      raise "You forgot to stub out your net requests!"
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
twilio_contactable-0.8.9 test/test_helper.rb
twilio_contactable-0.8.8 test/test_helper.rb
twilio_contactable-0.8.7 test/test_helper.rb
twilio_contactable-0.8.5 test/test_helper.rb
twilio_contactable-0.8.4 test/test_helper.rb
twilio_contactable-0.8.3 test/test_helper.rb
twilio_contactable-0.8.2 test/test_helper.rb
twilio_contactable-0.8.1 test/test_helper.rb
twilio_contactable-0.8.0 test/test_helper.rb
twilio_contactable-0.7.6 test/test_helper.rb
twilio_contactable-0.7.5 test/test_helper.rb
twilio_contactable-0.7.4 test/test_helper.rb
twilio_contactable-0.7.3 test/test_helper.rb
twilio_contactable-0.7.2 test/test_helper.rb
twilio_contactable-0.7.1 test/test_helper.rb