spec/spec_helper.rb in esendex-0.2.3 vs spec/spec_helper.rb in esendex-0.3.0

- old
+ new

@@ -1,16 +1,23 @@ require 'rake' require 'rspec' -require "#{Rake.application.original_dir}/lib/esendex" +# Configure Rails Environment +ENV["RAILS_ENV"] = "test" +require File.expand_path("../dummy/config/environment.rb", __FILE__) +require 'rspec/rails' + +Rails.backtrace_cleaner.remove_silencers! + +require_relative "../lib/esendex" +include Esendex + RSpec.configure do |config| config.color = true end -include Esendex - def random_string (0...24).map{ ('a'..'z').to_a[rand(26)] }.join end def random_email @@ -21,6 +28,10 @@ rand(9999) end def random_mobile "447#{"%09d" % rand(999999999)}" +end + +def random_time + Time.now + rand(9999) end \ No newline at end of file