lib/generators/rspec/interaction_generator.rb in simple_interaction-rails-0.0.5 vs lib/generators/rspec/interaction_generator.rb in simple_interaction-rails-0.0.7
- old
+ new
@@ -1,11 +1,14 @@
require 'rails/generators/named_base'
-class InteractionGenerator < ::Rails::Generators::NamedBase
- source_root File.expand_path("../templates", __FILE__)
- class_option :requirements, type: 'array', default: []
+module Rspec
+ class InteractionGenerator < ::Rails::Generators::NamedBase
+ source_root File.expand_path("../templates", __FILE__)
+ class_option :requirements, type: 'array', default: []
- def create_interaction_file
- template "interaction_spec.rb", File.join('test/interactions/', class_path, "#{file_name}_spec.rb")
- end
+ def create_interaction_file
+ template "interaction_spec.rb", File.join('spec/interactions/', class_path, "#{file_name}_spec.rb")
+ end
+ end
+
end