lib/rambo/rspec/helper_file.rb in rambo_ruby-0.5.0 vs lib/rambo/rspec/helper_file.rb in rambo_ruby-0.6.0
- old
+ new
@@ -9,11 +9,20 @@
attr_reader :options
def initialize(template_path:, file_path:, raml: nil, options: nil)
@template_path = template_path
@file_path = file_path
- @options = options || { rails: true }
+ @options = options || { framework: :rails }
@raml = raml ? Rambo::RamlModels::Api.new(raml) : nil
+ end
+
+ def app_classes
+ {
+ :rails => "Rails.application",
+ :"sinatra:classic" => "Sinatra::Application",
+ :"sinatra:modular" => "Sinatra::Base.descendants.find {|klass| klass != Sinatra::Application } || Sinatra::Application",
+ :grape => "Grape::API.descendants.first"
+ }
end
def generate
write_to_file(render) unless file_already_exists?
end