spec/generators/api_generator_spec.rb in gris-0.0.2 vs spec/generators/api_generator_spec.rb in gris-0.0.3
- old
+ new
@@ -10,11 +10,11 @@
Gris::CLI::Base.new.generate('api', api_name)
end
describe 'app' do
it 'creates an endpoint class' do
- expected_api_file = File.join(generator_tmp_directory, 'app/apis/foos_endpoint.rb')
+ expected_api_file = File.join(generator_tmp_directory, 'app/endpoints/foos_endpoint.rb')
api_code = File.read(expected_api_file)
expect(api_code).to match(/class FoosEndpoint/)
end
it 'creates a model class' do
@@ -54,10 +54,10 @@
end
end
describe 'spec' do
it 'creates an api spec' do
- expected_api_file = File.join(generator_tmp_directory, 'spec/apis/foos_endpoint_spec.rb')
+ expected_api_file = File.join(generator_tmp_directory, 'spec/endpoints/foos_endpoint_spec.rb')
api_code = File.read(expected_api_file)
expect(api_code).to match(/describe FoosEndpoint/)
end
it 'creates a fabricator' do