test/test_helper_generator.rb in padrino-gen-0.13.2 vs test/test_helper_generator.rb in padrino-gen-0.13.3
- old
+ new
@@ -60,17 +60,10 @@
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
end
- it 'should generate helper test for riot' do
- capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=riot') }
- capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
- capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
- assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
- end
-
it 'should generate helper test for minitest' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=minitest') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
@@ -89,16 +82,9 @@
capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
expected_pattern = /class DemoItemsHelperTest < Test::Unit::TestCase/m
assert_match_in_file(/context "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
assert_file_exists(@helper_test_path.gsub('app','subby'))
assert_file_exists("#{@apptmp}/sample_project/test/subby/helpers/demo_items_helper_test.rb")
- end
-
- it 'should generate helper test for steak' do
- capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=steak') }
- capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
- capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
- assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, "#{@apptmp}/sample_project/spec/subby/helpers/demo_items_helper_spec.rb")
end
it "should generate helper test for testunit" do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--test=testunit', '--script=none') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }