lib/committee/rails/test/methods.rb in committee-rails-0.2.1 vs lib/committee/rails/test/methods.rb in committee-rails-0.3.0
- old
+ new
@@ -2,14 +2,21 @@
module Test
module Methods
include Committee::Test::Methods
def committee_schema
+ @committee_schema = committee_options[:schema]
+
@committee_schema ||= begin
+
driver = Committee::Drivers::HyperSchema.new
schema_hash = JSON.parse(File.read(Rails.root.join('docs', 'schema', 'schema.json')))
driver.parse(schema_hash)
end
+ end
+
+ def committee_options
+ {}
end
def assert_schema_conform
@committee_schema ||= begin
# The preferred option. The user has already parsed a schema elsewhere