test/test_controller_generator.rb in padrino-gen-0.12.0.rc1 vs test/test_controller_generator.rb in padrino-gen-0.12.0.rc2

- old
+ new

@@ -113,17 +113,9 @@ capture_io { generate(:controller, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") } assert_match_in_file(/(\/\.\.){2}/m, @controller_test_path.gsub('app', 'subby')) assert_match_in_file(/describe "DemoItemsController" do/m, @controller_test_path.gsub('app', 'subby')) end - should "generate controller test for testspec" do - capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=testspec') } - capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") } - capture_io { generate(:controller, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") } - assert_match_in_file(/(\/\.\.){2}/m, @controller_test_path.gsub('app','subby')) - assert_match_in_file(/context "DemoItemsController" do/m, @controller_test_path.gsub('app','subby')) - end - should "generate controller test for rspec" do capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=rspec') } capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") } capture_io { generate(:controller, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") } assert_match_in_file(/describe "DemoItemsController" do/m, "#{@apptmp}/sample_project/spec/subby/controllers/demo_items_controller_spec.rb")