features/newgem_cli.feature in newgem-1.4.1 vs features/newgem_cli.feature in newgem-1.5.0
- old
+ new
@@ -3,11 +3,10 @@
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"
@@ -17,14 +16,12 @@
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
@@ -49,81 +46,72 @@
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
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"
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"}
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"}
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"
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"
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"
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"
Then shows version number
\ No newline at end of file