spec/spec_helper.rb in phony_rails-0.14.13 vs spec/spec_helper.rb in phony_rails-0.15.0
- old
+ new
@@ -7,11 +7,11 @@
require 'rubygems'
require 'bundler/setup'
require 'active_record'
-require 'mongoid'
+# require 'mongoid'
require 'phony_rails'
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: ':memory:'
@@ -33,10 +33,11 @@
included do
attr_accessor(
:country_code, :country_code_attribute, :custom_country_code, :delivery_method,
:home_country, :phone_method, :phone1_method, :recipient, :symboled_phone_method
)
+
phony_normalized_method :phone_attribute # adds normalized_phone_attribute method
phony_normalized_method :phone_method # adds normalized_phone_method method
phony_normalized_method :phone1_method, default_country_code: 'DE' # adds normalized_phone_method method
phony_normalized_method :symboled_phone_method, country_code: :country_code_attribute # adds phone_with_symboled_options method
phony_normalize :phone_number # normalized on validation
@@ -78,23 +79,23 @@
end
class ActiveModelDummy < ActiveModelModel
end
-class MongoidModel
- include Mongoid::Document
- include Mongoid::Phony
- field :phone_attribute, type: String
- field :phone_number, type: String
- field :phone_number_as_normalized, type: String
- field :fax_number
- field :country_code_attribute, type: String
- field :symboled_phone, type: String
- include SharedModelMethods
-end
+# class MongoidModel
+# include Mongoid::Document
+# include Mongoid::Phony
+# field :phone_attribute, type: String
+# field :phone_number, type: String
+# field :phone_number_as_normalized, type: String
+# field :fax_number
+# field :country_code_attribute, type: String
+# field :symboled_phone, type: String
+# include SharedModelMethods
+# end
-class MongoidDummy < MongoidModel
-end
+# class MongoidDummy < MongoidModel
+# end
I18n.config.enforce_available_locales = true
# RSpec.configure do |config|
# # some (optional) config here