diff --git a/vendor/plugins/blitz/features/controller_generator.feature b/vendor/plugins/blitz/features/controller_generator.feature index bb5c492..6306fdd 100644 --- a/vendor/plugins/blitz/features/controller_generator.feature +++ b/vendor/plugins/blitz/features/controller_generator.feature @@ -5,49 +5,49 @@ Feature: Rails controller generator Scenario: Controller generator for index action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "index" action And an empty "index" controller action for "posts" should be generated Scenario: Controller generator for new action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "new" action And a "new" controller action for "posts" should be generated Scenario: Controller generator for create action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "create" action And a "create" controller action for "posts" should be generated Scenario: Controller generator for create action when Cucumber is installed Given a Rails app with Cucumber - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "create" action And a "create" controller action for "posts" should be generated Scenario: Controller generator for show action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "show" action And a "show" controller action for "posts" should be generated Scenario: Controller generator for edit action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "edit" action And a "edit" controller action for "posts" should be generated Scenario: Controller generator for update action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "update" action And a "update" controller action for "posts" should be generated Scenario: Controller generator for destroy action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" controller with "destroy" action And a "destroy" controller action for "posts" should be generated diff --git a/vendor/plugins/blitz/features/feature_generator.feature b/vendor/plugins/blitz/features/feature_generator.feature index 3c8063f..cbd6a40 100644 --- a/vendor/plugins/blitz/features/feature_generator.feature +++ b/vendor/plugins/blitz/features/feature_generator.feature @@ -5,7 +5,7 @@ Feature: Rails controller generator Scenario: Feature generator for new action Given a Rails app with Cucumber - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "new" feature for "Posts" Then a "posts" feature for the "create" scenario should be generated And a "create posts" step definition should be generated @@ -13,7 +13,7 @@ Feature: Rails controller generator Scenario: Feature generator for create action same as new Given a Rails app with Cucumber - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "create" feature for "Posts" Then a "posts" feature for the "create" scenario should be generated And a "create posts" step definition should be generated @@ -21,7 +21,7 @@ Feature: Rails controller generator Scenario: Feature generator for edit action Given a Rails app with Cucumber - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "edit" feature for "Posts" Then a "posts" feature for the "edit" scenario should be generated And a "update posts" step definition should be generated @@ -29,7 +29,7 @@ Feature: Rails controller generator Scenario: Feature generator for update action same as edit Given a Rails app with Cucumber - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "update" feature for "Posts" Then a "posts" feature for the "update" scenario should be generated And a "update posts" step definition should be generated diff --git a/vendor/plugins/blitz/features/functional_test_generator.feature b/vendor/plugins/blitz/features/functional_test_generator.feature index da715ed..50f1bc4 100644 --- a/vendor/plugins/blitz/features/functional_test_generator.feature +++ b/vendor/plugins/blitz/features/functional_test_generator.feature @@ -5,49 +5,49 @@ Feature: Rails controller generator Scenario: Functional test generator for index action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "index" action Then a standard "index" functional test for "posts" should be generated Scenario: Functional test generator for new action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "new" action Then a standard "new" functional test for "posts" should be generated Scenario: Functional test generator for create action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "create" action Then a standard "create" functional test for "posts" should be generated Scenario: Functional test generator for create action when Cucumber is installed Given a Rails app with Cucumber - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "create" action Then a standard "create" functional test for "posts" should be generated Scenario: Functional test generator for show action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "show" action Then a standard "show" functional test for "posts" should be generated Scenario: Functional test generator for edit action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "edit" action Then a standard "edit" functional test for "posts" should be generated Scenario: Functional test generator for update action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "update" action Then a standard "update" functional test for "posts" should be generated Scenario: Functional test generator for destroy action Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a "Posts" functional test with "destroy" action Then a standard "destroy" functional test for "posts" should be generated diff --git a/vendor/plugins/blitz/features/helper_generator.feature b/vendor/plugins/blitz/features/helper_generator.feature index f0e0af7..ec0382f 100644 --- a/vendor/plugins/blitz/features/helper_generator.feature +++ b/vendor/plugins/blitz/features/helper_generator.feature @@ -5,7 +5,7 @@ Feature: Rails helper generator Scenario: Helper Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a helper named "Navigation" Then a helper should be generated for "Navigation" And a helper test should be generated for "Navigation" diff --git a/vendor/plugins/blitz/features/model_generator.feature b/vendor/plugins/blitz/features/model_generator.feature index 35e4e05..a8b3375 100644 --- a/vendor/plugins/blitz/features/model_generator.feature +++ b/vendor/plugins/blitz/features/model_generator.feature @@ -5,21 +5,21 @@ Feature: Rails model generator Scenario: Model generator without attributes Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a model named "User" Then a factory should be generated for "User" And a unit test should be generated for "User" Scenario: Model generator with attributes Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a model "User" with a string "email" Then a factory for "User" should have an "email" string And a unit test should be generated for "User" Scenario: Model generator with association Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a model "Post" that belongs to a "User" Then a factory for "Post" should have an association to "User" And the "Post" unit test should have "should_belong_to :user" macro @@ -29,7 +29,7 @@ Feature: Rails model generator Scenario: Model generator with Paperclip Given a Rails app - And the coulda plugin is installed + And the blitz plugin is installed When I generate a model "Design" with file "Image" Then the "Design" model should have "has_attached_file :image" macro And the "Design" unit test should have "should_have_attached_file :image" macro diff --git a/vendor/plugins/blitz/features/step_definitions/controller_steps.rb b/vendor/plugins/blitz/features/step_definitions/controller_steps.rb index ad81dee..df60687 100644 --- a/vendor/plugins/blitz/features/step_definitions/controller_steps.rb +++ b/vendor/plugins/blitz/features/step_definitions/controller_steps.rb @@ -18,7 +18,7 @@ Then /^a "create" controller action for "posts" should be generated$/ do " @post = Post.new(params[:post])\n" << " @post.save\n" << " flash[:success] = 'Post created.'\n" << - " redirect_to posts_path\n" << + " redirect_to root_path\n" << " end" end end @@ -45,7 +45,7 @@ Then /^a "update" controller action for "posts" should be generated$/ do " @post = Post.find(params[:id])\n" << " @post.update_attributes(params[:post])\n" << " flash[:success] = 'Post updated.'\n" << - " redirect_to posts_path\n" << + " redirect_to root_path\n" << " end" end end @@ -56,7 +56,7 @@ Then /^a "destroy" controller action for "posts" should be generated$/ do " @post = Post.find(params[:id])\n" << " @post.destroy\n" << " flash[:success] = 'Post deleted.'\n" << - " redirect_to posts_path\n" << + " redirect_to root_path\n" << " end" end end diff --git a/vendor/plugins/blitz/features/step_definitions/cucumber_steps.rb b/vendor/plugins/blitz/features/step_definitions/cucumber_steps.rb index 9e83ae6..062e04a 100644 --- a/vendor/plugins/blitz/features/step_definitions/cucumber_steps.rb +++ b/vendor/plugins/blitz/features/step_definitions/cucumber_steps.rb @@ -14,6 +14,7 @@ end Then /^a "posts" feature for the "([^\"]*)" scenario should be generated$/ do |action| if %w(new create).include?(action) assert_generated_file("features/posts.feature") do + "Feature: Posts\n\n" << " Scenario: Create a new post\n" << " Given I am on the new post page\n" << " When I create a post named \"A new post\"\n" << @@ -21,6 +22,7 @@ Then /^a "posts" feature for the "([^\"]*)" scenario should be generated$/ do |a end elsif %w(edit update).include?(action) assert_generated_file("features/posts.feature") do + "Feature: Posts\n\n" << " Scenario: Update a post\n" << " Given I am on the edit \"An existing post\" post page\n" << " When I update the post\n" << @@ -32,8 +34,8 @@ end Then /^a "create posts" step definition should be generated$/ do assert_generated_file("features/step_definitions/posts_steps.rb") do "When /^I create a post named \"([^\\\"]*)\"$/ do |name|\n" << - " fills_in :name, :with => name\n" << - " click_button 'Create'\n" + " fill_in :name, :with => name\n" << + " click_button 'Create'\n" << "end" end end @@ -48,8 +50,8 @@ end Then /^a "update posts" step definition should be generated$/ do assert_generated_file("features/step_definitions/posts_steps.rb") do "When /^I update a post named \"([^\\\"]*)\"$/ do |name|\n" << - " fills_in :name, :with => name\n" << - " click_button 'Update'\n" + " fill_in :name, :with => name\n" << + " click_button 'Update'\n" << "end" end end diff --git a/vendor/plugins/blitz/features/step_definitions/generator_steps.rb b/vendor/plugins/blitz/features/step_definitions/generator_steps.rb index 3df26cd..1ed01e3 100644 --- a/vendor/plugins/blitz/features/step_definitions/generator_steps.rb +++ b/vendor/plugins/blitz/features/step_definitions/generator_steps.rb @@ -3,11 +3,11 @@ Given 'a Rails app' do @rails_root = File.join(File.dirname(__FILE__), "..", "..", "rails_root") end -Given /^the coulda plugin is installed$/ do +Given /^the blitz plugin is installed$/ do plugin_dir = File.join(@rails_root, "vendor", "plugins") target = File.join(File.dirname(__FILE__), "..", "..", "generators") - FileUtils.mkdir_p "#{plugin_dir}/coulda" - system "cp -r #{target} #{plugin_dir}/coulda" + FileUtils.mkdir_p "#{plugin_dir}/blitz" + system "cp -r #{target} #{plugin_dir}/blitz" end After do diff --git a/vendor/plugins/blitz/features/step_definitions/view_steps.rb b/vendor/plugins/blitz/features/step_definitions/view_steps.rb index e8e8158..a99ffb8 100644 --- a/vendor/plugins/blitz/features/step_definitions/view_steps.rb +++ b/vendor/plugins/blitz/features/step_definitions/view_steps.rb @@ -4,6 +4,12 @@ When /^I generate a "([^\"]*)" view for "([^\"]*)"$/ do |view, resource| "cd .." end +When /^I generate a "([^\"]*)" view for "([^\"]*)" with the empty option$/ do |view, resource| + system "cd #{@rails_root} && " << + "script/generate view #{resource} #{view} --empty && " << + "cd .." +end + When /^a SemiFormal "new" view for "posts" should be generated$/ do assert_generated_file("app/views/posts/new.html.erb") do "