features/newgem_cli.feature in newgem-1.3.0 vs features/newgem_cli.feature in newgem-1.4.0

- old
+ new

@@ -1,85 +1,129 @@ -Feature: Can run 'newgem' to create RubyGem scaffolds +Feature: Can run "newgem" to create RubyGem scaffolds As a developer of RubyGems I want to create RubyGem scaffolds So that I can rapidly produce specs and code for encapsulated applications and libraries Scenario: Run newgem without any arguments Given a safe folder - Given env variable $RUBYFORGE_USERNAME set to '' - When newgem is executed for project 'my_project' with no options - Then file 'Rakefile' is created - And does invoke generator 'install_test_unit' - And does invoke generator 'install_rubigen_scripts' - And does not invoke generator 'install_website' - And does not invoke generator 'install_rspec' - And does not invoke generator 'install_shoulda' - And does not invoke generator 'install_cucumber' - And file 'config/website.yml' is not created - And output same as contents of 'newgem.out' + Given env variable $RUBYFORGE_USERNAME set to "" + When newgem is executed for project "my_project" with no options + Then file "Rakefile" is created + And does invoke generator "install_test_unit" + And does invoke generator "install_rubigen_scripts" + And does not invoke generator "install_website" + And does not invoke generator "install_rspec" + And does not invoke generator "install_shoulda" + And does not invoke generator "install_cucumber" + And file "config/website.yml" is not created + And I should see + """ + create + create doc + create lib + create script + create tasks + create lib/my_project + create History.txt + create Rakefile + create README.rdoc + create PostInstall.txt + create lib/my_project.rb + dependency install_test_unit + create test + create test/test_helper.rb + create test/test_my_project.rb + dependency install_rubigen_scripts + exists script + create script/generate + create script/destroy + create script/console + create Manifest.txt + readme readme + Important + ========= + + * Open Rakefile + * Update missing details (gem description, dependent gems, etc.) + """ And Rakefile can display tasks successfully + When I invoke task "rake test" + Then I should see all 1 tests pass Scenario: Run newgem with project name containing hypens Given a safe folder - Given env variable $RUBYFORGE_USERNAME set to '' - When newgem is executed for project 'my-project' with no options + Given env variable $RUBYFORGE_USERNAME set to "" + When newgem is executed for project "my-project" with no options Then Rakefile can display tasks successfully Scenario: Run newgem to include rspec Given a safe folder - When newgem is executed for project 'my_rspec_project' with options '-T rspec' - Then does invoke generator 'install_rspec' - And does not invoke generator 'install_test_unit' - And does not invoke generator 'install_shoulda' - And does not invoke generator 'install_cucumber' + When newgem is executed for project "my_rspec_project" with options "-T rspec" + Then does invoke generator "install_rspec" + And does not invoke generator "install_test_unit" + And does not invoke generator "install_shoulda" + And does not invoke generator "install_cucumber" And Rakefile can display tasks successfully + When I invoke task "rake spec" + Then I should see all 1 examples pass + Scenario: Run newgem to include shoulda + Given a safe folder + When newgem is executed for project "my_shoulda_project" with options "-T shoulda" + Then does invoke generator "install_shoulda" + And does not invoke generator "install_test_unit" + And does not invoke generator "install_rspec" + And does not invoke generator "install_cucumber" + And Rakefile can display tasks successfully + When I invoke task "rake test" + Then I should see all 1 tests pass + Scenario: Run newgem to enable website Given a safe folder - When newgem is executed for project 'my_project' with options '-w' - Then does invoke generator 'install_website' - And file 'config/website.yml.sample' is created - And yaml file 'config/website.yml.sample' contains {"host" => "unknown@rubyforge.org", "remote_dir" => "/var/www/gforge-projects/my_project"} + When newgem is executed for project "my_project" with options "-w" + Then does invoke generator "install_website" + And file "config/website.yml.sample" is created + And yaml file "config/website.yml.sample" contains {"host" => "unknown@rubyforge.org", "remote_dir" => "/var/www/gforge-projects/my_project"} And Rakefile can display tasks successfully Scenario: Run newgem to enable website, with env $RUBYFORGE_USERNAME set Given a safe folder - Given env variable $RUBYFORGE_USERNAME set to 'nicwilliams' - When newgem is executed for project 'my_project' with options '-w' - Then file 'config/website.yml.sample' is created - And yaml file 'config/website.yml.sample' contains {"host" => "nicwilliams@rubyforge.org", "remote_dir" => "/var/www/gforge-projects/my_project"} + Given env variable $RUBYFORGE_USERNAME set to "nicwilliams" + When newgem is executed for project "my_project" with options "-w" + Then file "config/website.yml.sample" is created + And yaml file "config/website.yml.sample" contains {"host" => "nicwilliams@rubyforge.org", "remote_dir" => "/var/www/gforge-projects/my_project"} And Rakefile can display tasks successfully Scenario: Run newgem to install misc generators on top of unit test framework Given a safe folder - When newgem is executed for project 'my_project' with options '-i cucumber' - Then does invoke generator 'install_test_unit' - And does invoke generator 'install_cucumber' - And does not invoke generator 'install_rspec' + When newgem is executed for project "my_project" with options "-i cucumber" + Then does invoke generator "install_test_unit" + And does invoke generator "install_cucumber" + And does not invoke generator "install_rspec" And Rakefile can display tasks successfully Scenario: Run newgem to pull in defaults from ~/.newgem.yml file and no argument options Given a safe folder And ~/.newgem.yml contains {"default" => "-T rspec -i cucumber"} - When newgem is executed for project 'my_project' with options '' - Then does invoke generator 'install_rspec' - And does invoke generator 'install_cucumber' - And does not invoke generator 'install_website' - And does not invoke generator 'install_test_unit' + When newgem is executed for project "my_project" with options "" + Then does invoke generator "install_rspec" + And does invoke generator "install_cucumber" + And does not invoke generator "install_website" + And does not invoke generator "install_test_unit" And Rakefile can display tasks successfully Scenario: Run newgem to pull in defaults from ~/.newgem.yml file and merge with runtime args Given a safe folder And ~/.newgem.yml contains {"default" => "-T rspec -i cucumber"} - When newgem is executed for project 'my_project' with options '-i website' - Then does invoke generator 'install_rspec' - And does invoke generator 'install_cucumber' - And does invoke generator 'install_website' - And does not invoke generator 'install_test_unit' + When newgem is executed for project "my_project" with options "-i website" + Then does invoke generator "install_rspec" + And does invoke generator "install_cucumber" + And does invoke generator "install_website" + And does not invoke generator "install_test_unit" And Rakefile can display tasks successfully Scenario: Run newgem and show current version number Given a safe folder - When newgem is executed only with options '--version' + When newgem is executed only with options "--version" Then shows version number \ No newline at end of file