106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# File 'lib/graphiti_spec_helpers/rspec.rb', line 106
def self.schema!(resources = nil)
::RSpec.describe 'Graphiti Schema' do
it 'generates a backwards-compatible schema' do
message = <<-MSG
Found backwards-incompatibilities in schema! Run with FORCE_SCHEMA=true to ignore.
Incompatibilities:
MSG
errors = Graphiti::Schema.generate!(resources)
errors.each do |e|
message << "#{e}\n"
end
expect(errors.empty?).to eq(true), message
end
end
end
|