Guest User

Untitled

a guest
Jul 19th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.88 KB | None | 0 0
  1. From 2b738e92a01abacc831a1b30b7ab14cf36e6e631 Mon Sep 17 00:00:00 2001
  2. From: Taryn East <git@taryneast.org>
  3. Date: Wed, 14 Oct 2009 22:10:09 +0100
  4. Subject: [PATCH] making active support work to make active resource tests pass again
  5.  
  6. ---
  7. activesupport/lib/active_support/callbacks.rb | 1 +
  8. activesupport/lib/active_support/test_case.rb | 1 +
  9. 2 files changed, 2 insertions(+), 0 deletions(-)
  10.  
  11. diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
  12. index 67e9b01..0856e4f 100644
  13. --- a/activesupport/lib/active_support/callbacks.rb
  14. +++ b/activesupport/lib/active_support/callbacks.rb
  15. @@ -1,6 +1,7 @@
  16. require 'active_support/core_ext/array/wrap'
  17. require 'active_support/core_ext/class/inheritable_attributes'
  18. require 'active_support/core_ext/kernel/reporting'
  19. +require 'active_support/concern'
  20.  
  21. module ActiveSupport
  22. # Callbacks are hooks into the lifecycle of an object that allow you to trigger logic
  23. diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
  24. index 1646891..bad155f 100644
  25. --- a/activesupport/lib/active_support/test_case.rb
  26. +++ b/activesupport/lib/active_support/test_case.rb
  27. @@ -1,4 +1,5 @@
  28. require 'test/unit/testcase'
  29. +require 'active_support/callbacks'
  30. require 'active_support/testing/setup_and_teardown'
  31. require 'active_support/testing/assertions'
  32. require 'active_support/testing/deprecation'
  33. --
  34. 1.5.6.3
  35.  
  36.  
  37. From af9e31e696f34709daba5cdbcba139d0044579b9 Mon Sep 17 00:00:00 2001
  38. From: Taryn East <git@taryneast.org>
  39. Date: Wed, 2 Dec 2009 21:50:55 +0000
  40. Subject: [PATCH] Bare essentials of the schema - an array on ARes
  41.  
  42. So, we will be embarking on the grand adventure of schema-dom for Active
  43. Resource. Begun by a very simple array being stored on the Active Resource
  44. object.
  45. This is clearly not useful for anything at this stage, but sets up the
  46. foundatin for all the rest of the funtionality.
  47. From here we can 'complicate' things by making the schema migration-like and
  48. actually using it to do useful stuff... but for now, this is the beginning.
  49. ---
  50. activeresource/lib/active_resource/base.rb | 16 ++++
  51. activeresource/test/cases/base/schema_test.rb | 115 +++++++++++++++++++++++++
  52. 2 files changed, 131 insertions(+), 0 deletions(-)
  53. create mode 100644 activeresource/test/cases/base/schema_test.rb
  54.  
  55. diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
  56. index 18105e8..b8aa028 100644
  57. --- a/activeresource/lib/active_resource/base.rb
  58. +++ b/activeresource/lib/active_resource/base.rb
  59. @@ -241,6 +241,15 @@ module ActiveResource
  60. cattr_accessor :logger
  61.  
  62. class << self
  63. + # Schema defines the known attributes of the current model.
  64. + #
  65. + # TODO: under construction - will add more doco as I go.
  66. + def schema=(the_schema)
  67. + @schema = the_schema
  68. + end
  69. + def schema
  70. + @schema ||= nil
  71. + end
  72. # Gets the URI of the REST resources to map for this class. The site variable is required for
  73. # Active Resource's mapping to work.
  74. def site
  75. @@ -776,6 +785,13 @@ module ActiveResource
  76. attr_accessor :attributes #:nodoc:
  77. attr_accessor :prefix_options #:nodoc:
  78.  
  79. + # If no schema has been defined for the class (see
  80. + # <tt>ActiveResource::schema=</tt>), the default automatic schema is
  81. + # generated from the current instance's attributes
  82. + def schema
  83. + self.class.schema || self.attributes.keys
  84. + end
  85. +
  86. # Constructor method for \new resources; the optional +attributes+ parameter takes a \hash
  87. # of attributes for the \new resource.
  88. #
  89. diff --git a/activeresource/test/cases/base/schema_test.rb b/activeresource/test/cases/base/schema_test.rb
  90. new file mode 100644
  91. index 0000000..2fb2707
  92. --- /dev/null
  93. +++ b/activeresource/test/cases/base/schema_test.rb
  94. @@ -0,0 +1,115 @@
  95. +require 'abstract_unit'
  96. +require "fixtures/person"
  97. +require "fixtures/street_address"
  98. +
  99. +########################################################################
  100. +# Testing the schema of your Active Resource models
  101. +########################################################################
  102. +class SchemaTest < ActiveModel::TestCase
  103. + def setup
  104. + @matz = { :id => 1, :name => 'Matz' }.to_xml(:root => 'person')
  105. + @david = { :id => 2, :name => 'David' }.to_xml(:root => 'person')
  106. + @greg = { :id => 3, :name => 'Greg' }.to_xml(:root => 'person')
  107. + @addy = { :id => 1, :street => '12345 Street', :country => 'Australia' }.to_xml(:root => 'address')
  108. + @default_request_headers = { 'Content-Type' => 'application/xml' }
  109. + @rick = { :name => "Rick", :age => 25 }.to_xml(:root => "person")
  110. + @people = [{ :id => 1, :name => 'Matz' }, { :id => 2, :name => 'David' }].to_xml(:root => 'people')
  111. + @people_david = [{ :id => 2, :name => 'David' }].to_xml(:root => 'people')
  112. + @addresses = [{ :id => 1, :street => '12345 Street', :country => 'Australia' }].to_xml(:root => 'addresses')
  113. +
  114. + ActiveResource::HttpMock.respond_to do |mock|
  115. + mock.get "/people/1.xml", {}, @matz
  116. + mock.get "/people/2.xml", {}, @david
  117. + mock.get "/people/Greg.xml", {}, @greg
  118. + mock.get "/people/4.xml", {'key' => 'value'}, nil, 404
  119. + mock.get "/people/5.xml", {}, @rick
  120. + mock.put "/people/1.xml", {}, nil, 204
  121. + mock.delete "/people/1.xml", {}, nil, 200
  122. + mock.delete "/people/2.xml", {}, nil, 400
  123. + mock.get "/people/99.xml", {}, nil, 404
  124. + mock.post "/people.xml", {}, @rick, 201, 'Location' => '/people/5.xml'
  125. + mock.get "/people.xml", {}, @people
  126. + mock.get "/people/1/addresses.xml", {}, @addresses
  127. + mock.get "/people/1/addresses/1.xml", {}, @addy
  128. + mock.get "/people/1/addresses/2.xml", {}, nil, 404
  129. + mock.get "/people/2/addresses/1.xml", {}, nil, 404
  130. + mock.get "/people/Greg/addresses/1.xml", {}, @addy
  131. + mock.put "/people/1/addresses/1.xml", {}, nil, 204
  132. + mock.delete "/people/1/addresses/1.xml", {}, nil, 200
  133. + mock.post "/people/1/addresses.xml", {}, nil, 201, 'Location' => '/people/1/addresses/5'
  134. + mock.get "/people//addresses.xml", {}, nil, 404
  135. + mock.get "/people//addresses/1.xml", {}, nil, 404
  136. + mock.put "/people//addressaddresseses/1.xml", {}, nil, 404
  137. + mock.delete "/people//addresses/1.xml", {}, nil, 404
  138. + mock.post "/people//addresses.xml", {}, nil, 404
  139. + mock.head "/people/1.xml", {}, nil, 200
  140. + mock.head "/people/Greg.xml", {}, nil, 200
  141. + mock.head "/people/99.xml", {}, nil, 404
  142. + mock.head "/people/1/addresses/1.xml", {}, nil, 200
  143. + mock.head "/people/1/addresses/2.xml", {}, nil, 404
  144. + mock.head "/people/2/addresses/1.xml", {}, nil, 404
  145. + mock.head "/people/Greg/addresses/1.xml", {}, nil, 200
  146. + end
  147. +
  148. + Person.user = nil
  149. + Person.password = nil
  150. + end
  151. +
  152. + test "schema on a new model should be empty" do
  153. + assert Person.schema.blank?, "should have a blank class schema"
  154. + assert Person.new.schema.blank?, "should have a blank instance schema"
  155. + end
  156. +
  157. + test "schema on a found model should return all the attributes of that model instance" do
  158. + p = Person.find(1)
  159. + s = p.schema
  160. +
  161. + assert s.present?, "should have found a non-empty schema!"
  162. +
  163. + p.attributes.each do |the_attr, val|
  164. + assert s.include?(the_attr), "should have found attr: #{the_attr} in schema, but only had: #{s.inspect}"
  165. + end
  166. + end
  167. +
  168. + test "with two instances, default schema should match the attributes of the individual instances - even if they differ" do
  169. + matz = Person.find(1)
  170. + rick = Person.find(5)
  171. +
  172. + m_attrs = matz.attributes.keys.sort
  173. + r_attrs = rick.attributes.keys.sort
  174. +
  175. + assert_not_equal m_attrs, r_attrs, "should have different attributes on each model"
  176. +
  177. + assert_not_equal matz.schema, rick.schema, "should have had different schemas too"
  178. + end
  179. +
  180. + test "defining a schema should return it when asked" do
  181. + assert Person.schema.blank?, "should have a blank class schema"
  182. + new_schema = [:name, :age, :height, :weight]
  183. + assert_nothing_raised {
  184. + Person.schema = new_schema
  185. + assert_equal new_schema, Person.schema, "should have saved the schema on the class"
  186. + assert_equal new_schema, Person.new.schema, "should have mde the schema available to every instance"
  187. + }
  188. +
  189. + Person.schema = nil # hack to stop test bleedthrough...
  190. + end
  191. +
  192. + test "defining a schema, then fetching a model should still match the defined schema" do
  193. + # sanity checks
  194. + assert Person.schema.blank?, "should have a blank class schema"
  195. + new_schema = [:name, :age, :height, :weight]
  196. +
  197. + matz = Person.find(1)
  198. + assert !matz.schema.blank?, "should have some sort of schema on an instance variable"
  199. + assert_not_equal new_schema, matz.schema, "should not have the class-level schema until it's been added to the class!"
  200. +
  201. + assert_nothing_raised {
  202. + Person.schema = new_schema
  203. + assert_equal new_schema, matz.schema, "class-level schema should override instance-level schema"
  204. + }
  205. +
  206. + Person.schema = nil # hack to stop test bleedthrough...
  207. + end
  208. +
  209. +end
  210. --
  211. 1.5.6.3
  212.  
  213.  
  214. From 0806fdf0231651801281133425f1da599499ca2e Mon Sep 17 00:00:00 2001
  215. From: Taryn East <git@taryneast.org>
  216. Date: Wed, 2 Dec 2009 21:53:13 +0000
  217. Subject: [PATCH] use schema to respond_to known 'columns' with true
  218.  
  219. First actual functionality of a schema - respond_to? will recognise any
  220. schema attributes as valid methods.
  221. ---
  222. activeresource/lib/active_resource/base.rb | 2 ++
  223. activeresource/test/cases/base/schema_test.rb | 16 ++++++++++++++++
  224. 2 files changed, 18 insertions(+), 0 deletions(-)
  225.  
  226. diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
  227. index b8aa028..294acba 100644
  228. --- a/activeresource/lib/active_resource/base.rb
  229. +++ b/activeresource/lib/active_resource/base.rb
  230. @@ -1175,6 +1175,8 @@ module ActiveResource
  231. super
  232. elsif attributes.has_key?(method_name)
  233. true
  234. + elsif schema && schema.include?(method_name.to_sym)
  235. + true
  236. elsif method_name =~ /(?:=|\?)$/ && attributes.include?($`)
  237. true
  238. else
  239. diff --git a/activeresource/test/cases/base/schema_test.rb b/activeresource/test/cases/base/schema_test.rb
  240. index 2fb2707..edd32e1 100644
  241. --- a/activeresource/test/cases/base/schema_test.rb
  242. +++ b/activeresource/test/cases/base/schema_test.rb
  243. @@ -112,4 +112,20 @@ class SchemaTest < ActiveModel::TestCase
  244. Person.schema = nil # hack to stop test bleedthrough...
  245. end
  246.  
  247. + test "should respond to all attributes in a schema" do
  248. + assert Person.schema.blank?, "should have a blank class schema"
  249. + new_schema = [:name, :age, :height, :weight, :my_new_schema_attribute ]
  250. + p = Person.new
  251. + #sanity check - should not respond to the brand-new one
  252. + assert !p.respond_do?(:my_new_schema_attribute)
  253. +
  254. + assert_nothing_raised {
  255. + Person.schema = new_schema
  256. + new_schema.each do |the_attr|
  257. + assert Person.new.respond_to?(the_attr), "shoud respond to the schema's methods, but failed on: #{the_attr}"
  258. + end
  259. + }
  260. + Person.schema = nil # hack to stop test bleedthrough...
  261. + end
  262. +
  263. end
  264. --
  265. 1.5.6.3
  266.  
  267.  
  268. From af3481cd3e9e45490d8cffab52f0fed36b23c9b6 Mon Sep 17 00:00:00 2001
  269. From: Taryn East <git@taryneast.org>
  270. Date: Wed, 2 Dec 2009 22:06:43 +0000
  271. Subject: [PATCH] More documentation for schema to explain.
  272.  
  273. Just a bit more commenting on what schema is and what it will do.
  274. ---
  275. activeresource/lib/active_resource/base.rb | 47 +++++++++++++++++++++++++--
  276. 1 files changed, 43 insertions(+), 4 deletions(-)
  277.  
  278. diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
  279. index 294acba..f02e595 100644
  280. --- a/activeresource/lib/active_resource/base.rb
  281. +++ b/activeresource/lib/active_resource/base.rb
  282. @@ -243,13 +243,52 @@ module ActiveResource
  283. class << self
  284. # Schema defines the known attributes of the current model.
  285. #
  286. - # TODO: under construction - will add more doco as I go.
  287. - def schema=(the_schema)
  288. - @schema = the_schema
  289. - end
  290. + # The schema we pass into an Active Resource is similar to an Active
  291. + # Record database schema definition. It defines the known attributes
  292. + # of a certain Active Record - even if there are currently no values
  293. + # for those attributes. It is like telling Active Resource that you
  294. + # know there will be attributes there someday.
  295. + #
  296. + # There is no need to specify a schema for your Active Resource. If
  297. + # you do not, the schema will be automatically generated on an
  298. + # instance from the attributes found there. That kind of schema is
  299. + # transient and it is possible that each instance will have a
  300. + # different 'schema' of this sort.
  301. + #
  302. + # The benefits of knowing the schema in advance, is that your instance
  303. + # method will know that they can respond to the known attributes and
  304. + # will return 'nil' when questioned (instead of MethodNotFound). This
  305. + # is helpful if you wish to have validations on those attributes.
  306. + #
  307. + #
  308. + # This section is very much under construction. More documentaion will
  309. + # be added as the functionality is expanded.
  310. + #
  311. + #
  312. + # For the moment, all you can do is pass an array of known
  313. + # attribute-names and it will be saved on the Resource. See
  314. + # <tt>schema=</tt> for an example of how this works.
  315. + #
  316. + # In future, the Resource will be far more responsive eg will return
  317. + # 'true' for a known attribute or cast the value saved to the
  318. + # appropriate type - just as Active Record currently does.
  319. def schema
  320. @schema ||= nil
  321. end
  322. + # Saves a schema to this resource - telling it what attributes are
  323. + # already known prior to fetching an object of this type form the
  324. + # remote system.
  325. + #
  326. + # example:
  327. + # class Person < ActiveResource::Base
  328. + # schema = [:name, :age, :height, :weight]
  329. + # end
  330. + # p = Person.new
  331. + # p.respond_to? :name # > true
  332. + #
  333. + def schema=(the_schema)
  334. + @schema = the_schema
  335. + end
  336. # Gets the URI of the REST resources to map for this class. The site variable is required for
  337. # Active Resource's mapping to work.
  338. def site
  339. --
  340. 1.5.6.3
  341.  
  342.  
  343. From a6877071c7f1d1c2fb95250fd9f48083c208f833 Mon Sep 17 00:00:00 2001
  344. From: Taryn East <git@taryneast.org>
  345. Date: Wed, 2 Dec 2009 22:22:42 +0000
  346. Subject: [PATCH] return nil instead of MethodNotFound if in schema
  347.  
  348. So this is why I wanted the schema all along - so that instead of exploding
  349. on a known attribute (simply because it hadn't been set yet) it should
  350. return nil - just like Active Record does.
  351. ---
  352. activeresource/lib/active_resource/base.rb | 4 ++-
  353. activeresource/test/cases/base/schema_test.rb | 33 +++++++++++++++++-------
  354. 2 files changed, 26 insertions(+), 11 deletions(-)
  355.  
  356. diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
  357. index f02e595..b8134cd 100644
  358. --- a/activeresource/lib/active_resource/base.rb
  359. +++ b/activeresource/lib/active_resource/base.rb
  360. @@ -1319,7 +1319,9 @@ module ActiveResource
  361. attributes[$`]
  362. end
  363. else
  364. - attributes.include?(method_name) ? attributes[method_name] : super
  365. + return attributes[method_name] if attributes.include?(method_name)
  366. + return nil if self.class.schema.include?(method_symbol.to_sym)
  367. + super
  368. end
  369. end
  370. end
  371. diff --git a/activeresource/test/cases/base/schema_test.rb b/activeresource/test/cases/base/schema_test.rb
  372. index edd32e1..a3517d4 100644
  373. --- a/activeresource/test/cases/base/schema_test.rb
  374. +++ b/activeresource/test/cases/base/schema_test.rb
  375. @@ -112,20 +112,33 @@ class SchemaTest < ActiveModel::TestCase
  376. Person.schema = nil # hack to stop test bleedthrough...
  377. end
  378.  
  379. - test "should respond to all attributes in a schema" do
  380. - assert Person.schema.blank?, "should have a blank class schema"
  381. - new_schema = [:name, :age, :height, :weight, :my_new_schema_attribute ]
  382. - p = Person.new
  383. - #sanity check - should not respond to the brand-new one
  384. - assert !p.respond_do?(:my_new_schema_attribute)
  385. + test "should respond positively to attributes only in a schema" do
  386. + new_attr_name = :my_new_schema_attribute
  387. + assert Person.schema.blank?, "sanity check - should have a blank class schema"
  388. +
  389. + assert !Person.new.respond_do?(new_attr_name), "sanity check - should not respond to the brand-new attribute yet"
  390.  
  391. assert_nothing_raised {
  392. - Person.schema = new_schema
  393. - new_schema.each do |the_attr|
  394. - assert Person.new.respond_to?(the_attr), "shoud respond to the schema's methods, but failed on: #{the_attr}"
  395. - end
  396. + Person.schema = [new_attr_name]
  397. + assert Person.new.respond_to?(new_attr_name), "should respond to the schema's methods, but failed on: #{new_attr_name}"
  398. }
  399. Person.schema = nil # hack to stop test bleedthrough...
  400. end
  401.  
  402. + test "should not give method_missing for attribute only in schema" do
  403. + new_attr_name = :another_new_schema_attribute
  404. +
  405. + assert Person.schema.blank?, "sanity check - should have a blank class schema"
  406. +
  407. + assert_raises(NoMethodError, "should not have found the attribute: #{new_attr_name} as a method") do
  408. + Person.new.send(new_attr_name)
  409. + end
  410. +
  411. + Person.schema = [new_attr_name]
  412. + assert_nothing_raised do
  413. + Person.new.send(new_attr_name)
  414. + end
  415. + Person.schema = nil # hack to stop test bleedthrough...
  416. + end
  417. +
  418. end
  419. --
  420. 1.5.6.3
  421.  
  422.  
  423. From 8a10e7306deb6b7e2f6489190f19ed36c2746140 Mon Sep 17 00:00:00 2001
  424. From: Taryn East <git@taryneast.org>
  425. Date: Wed, 2 Dec 2009 22:36:11 +0000
  426. Subject: [PATCH] Should symbolise schema keys to normalise
  427.  
  428. Rather than hashes with indifferent access and all the inherant errors, we
  429. need to settle on either strings or symbols. I may change it all over to
  430. strings instead (as there seems to be a common theme in ARes for that), but
  431. for now - it's all symbols.
  432. ---
  433. activeresource/lib/active_resource/base.rb | 3 ++-
  434. activeresource/test/cases/base/schema_test.rb | 25 +++++++++++++++++++------
  435. 2 files changed, 21 insertions(+), 7 deletions(-)
  436.  
  437. diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
  438. index b8134cd..a470a39 100644
  439. --- a/activeresource/lib/active_resource/base.rb
  440. +++ b/activeresource/lib/active_resource/base.rb
  441. @@ -287,7 +287,8 @@ module ActiveResource
  442. # p.respond_to? :name # > true
  443. #
  444. def schema=(the_schema)
  445. - @schema = the_schema
  446. + @schema = nil
  447. + @schema = the_schema.map(&:to_sym) if the_schema.present?
  448. end
  449. # Gets the URI of the REST resources to map for this class. The site variable is required for
  450. # Active Resource's mapping to work.
  451. diff --git a/activeresource/test/cases/base/schema_test.rb b/activeresource/test/cases/base/schema_test.rb
  452. index a3517d4..9d297b5 100644
  453. --- a/activeresource/test/cases/base/schema_test.rb
  454. +++ b/activeresource/test/cases/base/schema_test.rb
  455. @@ -54,12 +54,31 @@ class SchemaTest < ActiveModel::TestCase
  456. Person.user = nil
  457. Person.password = nil
  458. end
  459. + def teardown
  460. + Person.schema = nil # hack to stop test bleedthrough...
  461. + end
  462.  
  463. test "schema on a new model should be empty" do
  464. assert Person.schema.blank?, "should have a blank class schema"
  465. assert Person.new.schema.blank?, "should have a blank instance schema"
  466. end
  467.  
  468. + test "schema should accept array of syms" do
  469. + new_schema = [:age, :name]
  470. +
  471. + assert_nothing_raised { Person.schema = new_schema }
  472. + assert_equal new_schema, Person.schema
  473. + end
  474. +
  475. + test "schema should symbolise array of strings" do
  476. + new_schema = ['name', 'age']
  477. + new_schema_syms = new_schema.map(&:to_sym)
  478. +
  479. + assert_nothing_raised { Person.schema = new_schema }
  480. + assert_equal new_schema_syms, Person.schema
  481. + end
  482. +
  483. +
  484. test "schema on a found model should return all the attributes of that model instance" do
  485. p = Person.find(1)
  486. s = p.schema
  487. @@ -91,8 +110,6 @@ class SchemaTest < ActiveModel::TestCase
  488. assert_equal new_schema, Person.schema, "should have saved the schema on the class"
  489. assert_equal new_schema, Person.new.schema, "should have mde the schema available to every instance"
  490. }
  491. -
  492. - Person.schema = nil # hack to stop test bleedthrough...
  493. end
  494.  
  495. test "defining a schema, then fetching a model should still match the defined schema" do
  496. @@ -108,8 +125,6 @@ class SchemaTest < ActiveModel::TestCase
  497. Person.schema = new_schema
  498. assert_equal new_schema, matz.schema, "class-level schema should override instance-level schema"
  499. }
  500. -
  501. - Person.schema = nil # hack to stop test bleedthrough...
  502. end
  503.  
  504. test "should respond positively to attributes only in a schema" do
  505. @@ -122,7 +137,6 @@ class SchemaTest < ActiveModel::TestCase
  506. Person.schema = [new_attr_name]
  507. assert Person.new.respond_to?(new_attr_name), "should respond to the schema's methods, but failed on: #{new_attr_name}"
  508. }
  509. - Person.schema = nil # hack to stop test bleedthrough...
  510. end
  511.  
  512. test "should not give method_missing for attribute only in schema" do
  513. @@ -138,7 +152,6 @@ class SchemaTest < ActiveModel::TestCase
  514. assert_nothing_raised do
  515. Person.new.send(new_attr_name)
  516. end
  517. - Person.schema = nil # hack to stop test bleedthrough...
  518. end
  519.  
  520. end
  521. --
  522. 1.5.6.3
Add Comment
Please, Sign In to add comment