test/support/factory.rb in deas-nm-0.1.0 vs test/support/factory.rb in deas-nm-0.2.0
- old
+ new
@@ -1,21 +1,39 @@
require 'assert/factory'
module Factory
extend Assert::Factory
- def self.template_json_rendered(view_handler, locals)
+ def self.template_json_rendered(engine, view_handler, locals)
{ 'thing' => {
'id' => view_handler.identifier,
'name' => view_handler.name,
- 'local1' => locals['local1']
+ 'local1' => locals['local1'],
+ 'logger' => engine.logger.to_s
}
}
end
- def self.partial_json_rendered(locals)
+ def self.partial_json_rendered(engine, locals)
{ 'thing' => {
- 'local1' => locals['local1']
+ 'local1' => locals['local1'],
+ 'logger' => engine.logger.to_s
+ }
+ }
+ end
+
+ def self.template_partial_json_rendered(engine, view_handler, locals)
+ { 'thing' => {
+ 'id' => view_handler.identifier,
+ 'name' => view_handler.name,
+ 'local1' => locals['local1'],
+ 'logger' => engine.logger.to_s
+ },
+ 'partial' => {
+ 'thing' => {
+ 'local1' => locals['local1'],
+ 'logger' => engine.logger.to_s
+ }
}
}
end
end