Skip to content

Commit

Permalink
Housekeeping: Creating a project example is more correct. Features in…
Browse files Browse the repository at this point in the history
… folders
  • Loading branch information
antonymarcano committed Jul 4, 2011
1 parent 27d9ba4 commit e227de5
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 17 deletions.
17 changes: 2 additions & 15 deletions features/creating_a_new_project.feature
Expand Up @@ -5,20 +5,7 @@ Feature: Creating a New Project


Scenario: Set up your project and verify that you can use CukeSalad Scenario: Set up your project and verify that you can use CukeSalad
Given you are a Step Free Cuker Given you are a Step Free Cuker
And you were able to create directories: as follows And you were able to interactively run, the command 'cukesalad' and type 'y'
"""
features
features/lib
features/lib/roles
features/lib/tasks
features/support
"""
And you were able to create a file: at 'features/support/env.rb' containing
"""
$:.unshift(File.dirname(__FILE__) + "/../../../../lib") #where to find CukeSalad
require "cukesalad"
"""
And you were able to create a file: at 'features/hello_cukesalad.feature' containing And you were able to create a file: at 'features/hello_cukesalad.feature' containing
""" """
Feature: Hello CukeSalad Feature: Hello CukeSalad
Expand All @@ -31,4 +18,4 @@ Feature: Creating a New Project
""" """
CukeSalad says: Hello!! CukeSalad says: Hello!!
""" """
And you should see it has 'passed' And you should see it has 'passed'
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions features/lib/tasks/interactively_run.rb
@@ -0,0 +1,5 @@
in_order_to "interactively run", the_command: :command, and_type: :answer do
@aruba_timeout_seconds = 10
run_interactive unescape( the :command )
type "#{the :answer}\n"
end
2 changes: 1 addition & 1 deletion lib/cukesalad/cli.rb
Expand Up @@ -54,7 +54,7 @@ def create_cukesalad_structure


def configure def configure
cd "features/support" cd "features/support"
content = "require 'cukesalad'\n begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end" content = "\nrequire 'cukesalad'\nbegin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end"
append_to_file "env.rb",content append_to_file "env.rb",content
end end


Expand Down
2 changes: 1 addition & 1 deletion spec/cukesalad/cli_spec.rb
Expand Up @@ -42,7 +42,7 @@ def file_content file
end end


it 'env.rb has the right content' do it 'env.rb has the right content' do
content = "require 'cukesalad'\n begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end" content = "\nrequire 'cukesalad'\nbegin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end"
file_content(file).should == content file_content(file).should == content
end end
end end
Expand Down

0 comments on commit e227de5

Please sign in to comment.