cucumber-standalone 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'cucumber_standalone'
4
+ CucumberStandalone.start
@@ -0,0 +1,22 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = %q{cucumber-standalone}
3
+ s.summary = %q{generator for standalone cuke projects}
4
+ s.description = %q{generator for standalone cuke projects}
5
+ s.homepage = %q{http://github.com/jnewland/cucumber-standalone}
6
+ s.version = '0.0.1'
7
+ s.authors = "Jesse Newland"
8
+ s.email = %q{jnewland@gmail.com}
9
+
10
+ s.rubygems_version = %q{1.3.7}
11
+ s.date = %q{2010-11-05}
12
+
13
+ s.require_paths = ["lib"]
14
+ s.files = %x{git ls-files}.split("\n")
15
+ s.has_rdoc = false
16
+ s.executables = ["cucumber-standalone"]
17
+
18
+ s.add_dependency(%q<thor>, [">= 0.14.4"])
19
+ s.add_dependency(%q<cucumber>, [">= 0.9.3"])
20
+ s.add_dependency(%q<webrat>, [">= 0.7.2"])
21
+ s.add_dependency(%q<mechanize>,[">= 1.0.0"])
22
+ end
@@ -0,0 +1,27 @@
1
+ require 'thor'
2
+ require 'thor/group'
3
+ require 'fileutils'
4
+ class CucumberStandalone < Thor::Group
5
+ include Thor::Actions
6
+
7
+ argument :dir_name
8
+
9
+ def self.source_root
10
+ File.join(File.dirname(__FILE__), '..', 'templates')
11
+ end
12
+
13
+ def create_stuff
14
+ self.destination_root = File.expand_path(dir_name, destination_root)
15
+ empty_directory '.'
16
+ FileUtils.cd(destination_root)
17
+ empty_directory 'features'
18
+ inside 'features' do
19
+ template 'example.feature', 'example.feature'
20
+ empty_directory 'support'
21
+ template 'support/env.rb'
22
+ template 'step_definitions/web_steps.rb'
23
+ end
24
+
25
+ end
26
+
27
+ end
@@ -0,0 +1,9 @@
1
+ Feature: Geekend Schedule
2
+ In order to get the most out of Geekend
3
+ As an attendee
4
+ I should be able to easily read information about the talks
5
+
6
+ Scenario: Finding Jesse's talk
7
+ When I go to http://www.geekend2010.com
8
+ When I follow "Geekend 2010 Schedule"
9
+ Then I should see "Testing The Web"
@@ -0,0 +1,43 @@
1
+ Given /^I am on (.+)$/ do |path|
2
+ visit path
3
+ end
4
+
5
+ When /^I go to (.*)$/ do |path|
6
+ visit path
7
+ end
8
+
9
+ When /^I press "(.*)"$/ do |button|
10
+ click_button(button)
11
+ end
12
+
13
+ When /^I follow "(.*)"$/ do |link|
14
+ click_link(link)
15
+ end
16
+
17
+ When /^I fill in "(.*)" with "(.*)"$/ do |field, value|
18
+ fill_in(field, :with => value)
19
+ end
20
+
21
+ When /^I select "(.*)" from "(.*)"$/ do |value, field|
22
+ select(value, :from => field)
23
+ end
24
+
25
+ When /^I check "(.*)"$/ do |field|
26
+ check(field)
27
+ end
28
+
29
+ When /^I uncheck "(.*)"$/ do |field|
30
+ uncheck(field)
31
+ end
32
+
33
+ When /^I choose "(.*)"$/ do |field|
34
+ choose(field)
35
+ end
36
+
37
+ Then /^I should see "(.*)"$/ do |text|
38
+ response.body.to_s.should =~ /#{text}/m
39
+ end
40
+
41
+ Then /^I should not see "(.*)"$/ do |text|
42
+ response.body.to_s.should_not =~ /#{text}/m
43
+ end
@@ -0,0 +1,18 @@
1
+ require 'webrat'
2
+
3
+ Webrat.configure do |config|
4
+ config.mode = :mechanize
5
+ end
6
+
7
+ class MechanizeWorld < Webrat::MechanizeAdapter
8
+ include Webrat::Matchers
9
+ include Webrat::Methods
10
+ # no idea why we need this but without it response_code is not always recognized
11
+ Webrat::Methods.delegate_to_session :response_code, :response_body
12
+ # this is needed for webrat_steps.rb
13
+ Webrat::Methods.delegate_to_session :response
14
+ end
15
+
16
+ World do
17
+ MechanizeWorld.new
18
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cucumber-standalone
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Jesse Newland
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-05 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: thor
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 47
30
+ segments:
31
+ - 0
32
+ - 14
33
+ - 4
34
+ version: 0.14.4
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: cucumber
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 61
46
+ segments:
47
+ - 0
48
+ - 9
49
+ - 3
50
+ version: 0.9.3
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: webrat
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 7
62
+ segments:
63
+ - 0
64
+ - 7
65
+ - 2
66
+ version: 0.7.2
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: mechanize
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 23
78
+ segments:
79
+ - 1
80
+ - 0
81
+ - 0
82
+ version: 1.0.0
83
+ type: :runtime
84
+ version_requirements: *id004
85
+ description: generator for standalone cuke projects
86
+ email: jnewland@gmail.com
87
+ executables:
88
+ - cucumber-standalone
89
+ extensions: []
90
+
91
+ extra_rdoc_files: []
92
+
93
+ files:
94
+ - .gitignore
95
+ - bin/cucumber-standalone
96
+ - cucumber-standalone.gemspec
97
+ - lib/cucumber_standalone.rb
98
+ - templates/features/example.feature
99
+ - templates/features/step_definitions/web_steps.rb
100
+ - templates/features/support/env.rb
101
+ has_rdoc: true
102
+ homepage: http://github.com/jnewland/cucumber-standalone
103
+ licenses: []
104
+
105
+ post_install_message:
106
+ rdoc_options: []
107
+
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ hash: 3
116
+ segments:
117
+ - 0
118
+ version: "0"
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ hash: 3
125
+ segments:
126
+ - 0
127
+ version: "0"
128
+ requirements: []
129
+
130
+ rubyforge_project:
131
+ rubygems_version: 1.3.7
132
+ signing_key:
133
+ specification_version: 3
134
+ summary: generator for standalone cuke projects
135
+ test_files: []
136
+