lib/maily/generator.rb in maily-0.10.1 vs lib/maily/generator.rb in maily-0.11.0
- old
+ new
@@ -21,12 +21,18 @@
hooks << _hooks
hooks << "end"
end
end
- fixtures = fixtures.flatten.uniq.map { |f| "#{f.to_s} = ''" }.join("\n")
+ fixtures = fixtures.flatten.uniq.map do |fixture|
+ argument = fixture.to_s
+ value = argument.pluralize == argument ? '[]' : "''"
+
+ [argument, value].join(' = ')
+ end.join("\n")
+
hooks = hooks.join("\n")
fixtures + "\n" + hooks + "\n"
end
end
-end
\ No newline at end of file
+end