test/helper.rb in padrino-gen-0.9.9 vs test/helper.rb in padrino-gen-0.9.10

- old
+ new

@@ -30,9 +30,14 @@ def stop_time_for_test time = Time.now Time.stubs(:now).returns(time) return time end + + # generate(:controller, 'DemoItems', '-r=/tmp/sample_project') + def generate(name, *params) + "Padrino::Generators::#{name.to_s.camelize}".constantize.start(params) + end # assert_has_tag(:h1, :content => "yellow") { "<h1>yellow</h1>" } # In this case, block is the html to evaluate def assert_has_tag(name, attributes = {}, &block) html = block && block.call \ No newline at end of file