cucumber-rails 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +194 -0
- data/History.txt +101 -1
- data/LICENSE +22 -0
- data/README.md +77 -0
- data/Rakefile +3 -19
- data/config/cucumber.yml +1 -0
- data/cucumber-rails.gemspec +37 -101
- data/dev_tasks/cucumber.rake +1 -1
- data/dev_tasks/rspec.rake +6 -11
- data/features/allow_rescue.feature +63 -0
- data/features/capybara_javascript_drivers.feature +87 -0
- data/features/database_cleaner.feature +44 -0
- data/features/emulate_javascript.feature +34 -0
- data/features/inspect_query_string.feature +37 -0
- data/features/install_cucumber_rails.feature +16 -0
- data/features/mongoid.feature +53 -0
- data/features/multiple_databases.feature +74 -0
- data/features/named_selectors.feature +33 -0
- data/features/no_database.feature +70 -0
- data/features/pseduo_class_selectors.feature +24 -0
- data/features/rerun_profile.feature +38 -0
- data/features/rest_api.feature +47 -0
- data/features/routing.feature +18 -0
- data/features/select_dates.feature +99 -0
- data/features/step_definitions/cucumber_rails_steps.rb +80 -6
- data/features/support/env.rb +8 -2
- data/features/test_unit.feature +43 -0
- data/lib/cucumber/rails/capybara/javascript_emulation.rb +83 -0
- data/lib/cucumber/rails/capybara/select_dates_and_times.rb +50 -0
- data/lib/cucumber/rails/capybara.rb +6 -0
- data/lib/cucumber/rails/hooks/active_record.rb +14 -0
- data/lib/cucumber/rails/hooks/allow_rescue.rb +8 -0
- data/lib/cucumber/rails/hooks/database_cleaner.rb +13 -0
- data/lib/cucumber/rails/hooks/mail.rb +5 -0
- data/lib/cucumber/rails/hooks.rb +4 -0
- data/lib/cucumber/rails/rspec.rb +4 -6
- data/lib/cucumber/rails/world.rb +13 -35
- data/lib/cucumber/rails.rb +8 -0
- data/lib/cucumber/rails3/action_controller.rb +12 -0
- data/lib/cucumber/rails3/active_record.rb +8 -0
- data/lib/cucumber/rails3/application.rb +17 -0
- data/lib/cucumber/rails3.rb +16 -0
- data/lib/cucumber/web/tableish.rb +50 -9
- data/lib/generators/cucumber/feature/feature_generator.rb +8 -17
- data/lib/generators/cucumber/feature/named_arg.rb +2 -0
- data/{templates/feature → lib/generators/cucumber/feature/templates}/feature.erb +10 -12
- data/{templates/feature → lib/generators/cucumber/feature/templates}/steps.erb +1 -1
- data/lib/generators/cucumber/install/USAGE +15 -0
- data/lib/generators/cucumber/install/install_generator.rb +88 -0
- data/lib/generators/cucumber/install/templates/config/cucumber.yml.erb +8 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps.rb.erb +192 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_cs.rb.erb +127 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_da.rb.erb +105 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_de.rb.erb +127 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_es.rb.erb +127 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_ja.rb.erb +140 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_ko.rb.erb +142 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_no.rb.erb +105 -0
- data/lib/generators/cucumber/install/templates/step_definitions/web_steps_pt-BR.rb.erb +132 -0
- data/lib/generators/cucumber/install/templates/support/_rails_each_run.rb.erb +36 -0
- data/lib/generators/cucumber/install/templates/support/_rails_prefork.rb.erb +1 -0
- data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/capybara.rb +0 -4
- data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/paths.rb +11 -5
- data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/rails.rb.erb +2 -2
- data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/rails_spork.rb.erb +2 -2
- data/lib/generators/cucumber/install/templates/support/selectors.rb +39 -0
- data/lib/generators/cucumber/install/templates/support/web_steps_warning.txt +19 -0
- data/{templates/skeleton → lib/generators/cucumber/install/templates}/tasks/cucumber.rake.erb +18 -0
- data/spec/cucumber/web/tableish_spec.rb +83 -6
- data/spec/spec_helper.rb +1 -4
- metadata +299 -73
- data/HACKING.rdoc +0 -34
- data/README.rdoc +0 -64
- data/VERSION +0 -1
- data/features/rails2.feature +0 -56
- data/features/rails3.feature +0 -52
- data/features/support/matchers/files.rb +0 -17
- data/generators/cucumber/USAGE +0 -14
- data/generators/cucumber/cucumber_generator.rb +0 -89
- data/generators/cucumber/templates/step_definitions/web_steps_ja.rb.erb +0 -136
- data/generators/feature/USAGE +0 -12
- data/generators/feature/feature_generator.rb +0 -47
- data/lib/cucumber/rails/action_controller.rb +0 -65
- data/lib/cucumber/rails/active_record.rb +0 -34
- data/lib/cucumber/rails/capybara_javascript_emulation.rb +0 -72
- data/lib/cucumber/rails/test_unit.rb +0 -9
- data/lib/generators/cucumber/feature/feature_base.rb +0 -29
- data/lib/generators/cucumber/skeleton/USAGE +0 -21
- data/lib/generators/cucumber/skeleton/skeleton_base.rb +0 -202
- data/lib/generators/cucumber/skeleton/skeleton_generator.rb +0 -64
- data/rvm.yml +0 -22
- data/spec/generators/cucumber/skeleton/skeleton_base_spec.rb +0 -84
- data/spec/spec.opts +0 -2
- data/templates/skeleton/config/cucumber.yml.erb +0 -7
- data/templates/skeleton/environments/cucumber.rb.erb +0 -37
- data/templates/skeleton/step_definitions/capybara_steps.rb.erb +0 -197
- data/templates/skeleton/step_definitions/web_steps_cs.rb.erb +0 -136
- data/templates/skeleton/step_definitions/web_steps_da.rb.erb +0 -114
- data/templates/skeleton/step_definitions/web_steps_de.rb.erb +0 -136
- data/templates/skeleton/step_definitions/web_steps_es.rb.erb +0 -136
- data/templates/skeleton/step_definitions/web_steps_no.rb.erb +0 -114
- data/templates/skeleton/step_definitions/web_steps_pt-BR.rb.erb +0 -140
- data/templates/skeleton/step_definitions/webrat_steps.rb.erb +0 -268
- data/templates/skeleton/support/_rails_each_run.rb +0 -34
- data/templates/skeleton/support/_rails_prefork.rb.erb +0 -10
- data/templates/skeleton/support/webrat.rb +0 -8
- /data/{templates/skeleton → lib/generators/cucumber/install/templates}/script/cucumber +0 -0
- /data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/edit_warning.txt +0 -0
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--format progress --colour
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm @cucumber --create
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
cucumber-rails (1.0.0)
|
5
|
+
capybara (>= 1.0.0)
|
6
|
+
cucumber (~> 1.0.0)
|
7
|
+
nokogiri (>= 1.4.4)
|
8
|
+
rack-test (>= 0.5.7)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: http://rubygems.org/
|
12
|
+
specs:
|
13
|
+
actionmailer (3.1.0.rc4)
|
14
|
+
actionpack (= 3.1.0.rc4)
|
15
|
+
mail (~> 2.3.0)
|
16
|
+
actionpack (3.1.0.rc4)
|
17
|
+
activemodel (= 3.1.0.rc4)
|
18
|
+
activesupport (= 3.1.0.rc4)
|
19
|
+
builder (~> 3.0.0)
|
20
|
+
erubis (~> 2.7.0)
|
21
|
+
i18n (~> 0.6)
|
22
|
+
rack (~> 1.3.0)
|
23
|
+
rack-cache (~> 1.0.1)
|
24
|
+
rack-mount (~> 0.8.1)
|
25
|
+
rack-test (~> 0.6.0)
|
26
|
+
sprockets (~> 2.0.0.beta.10)
|
27
|
+
tzinfo (~> 0.3.27)
|
28
|
+
activemodel (3.1.0.rc4)
|
29
|
+
activesupport (= 3.1.0.rc4)
|
30
|
+
bcrypt-ruby (~> 2.1.4)
|
31
|
+
builder (~> 3.0.0)
|
32
|
+
i18n (~> 0.6)
|
33
|
+
activerecord (3.1.0.rc4)
|
34
|
+
activemodel (= 3.1.0.rc4)
|
35
|
+
activesupport (= 3.1.0.rc4)
|
36
|
+
arel (~> 2.1.1)
|
37
|
+
tzinfo (~> 0.3.27)
|
38
|
+
activeresource (3.1.0.rc4)
|
39
|
+
activemodel (= 3.1.0.rc4)
|
40
|
+
activesupport (= 3.1.0.rc4)
|
41
|
+
activesupport (3.1.0.rc4)
|
42
|
+
multi_json (~> 1.0)
|
43
|
+
ansi (1.2.5)
|
44
|
+
arel (2.1.1)
|
45
|
+
aruba (0.4.2)
|
46
|
+
bcat (>= 0.6.1)
|
47
|
+
childprocess (>= 0.1.9)
|
48
|
+
cucumber (>= 0.10.7)
|
49
|
+
rdiscount (>= 1.6.8)
|
50
|
+
rspec (>= 2.6.0)
|
51
|
+
bcat (0.6.1)
|
52
|
+
rack (~> 1.0)
|
53
|
+
bcrypt-ruby (2.1.4)
|
54
|
+
bson (1.3.1)
|
55
|
+
bson_ext (1.3.1)
|
56
|
+
builder (3.0.0)
|
57
|
+
capybara (1.0.0)
|
58
|
+
mime-types (>= 1.16)
|
59
|
+
nokogiri (>= 1.3.3)
|
60
|
+
rack (>= 1.0.0)
|
61
|
+
rack-test (>= 0.5.4)
|
62
|
+
selenium-webdriver (~> 0.2.0)
|
63
|
+
xpath (~> 0.1.4)
|
64
|
+
childprocess (0.1.9)
|
65
|
+
ffi (~> 1.0.6)
|
66
|
+
coffee-script (2.2.0)
|
67
|
+
coffee-script-source
|
68
|
+
execjs
|
69
|
+
coffee-script-source (1.1.1)
|
70
|
+
cucumber (1.0.0)
|
71
|
+
builder (>= 2.1.2)
|
72
|
+
diff-lcs (>= 1.1.2)
|
73
|
+
gherkin (~> 2.4.1)
|
74
|
+
json (>= 1.4.6)
|
75
|
+
term-ansicolor (>= 1.0.5)
|
76
|
+
database_cleaner (0.6.7)
|
77
|
+
diff-lcs (1.1.2)
|
78
|
+
erubis (2.7.0)
|
79
|
+
execjs (1.2.0)
|
80
|
+
multi_json (~> 1.0)
|
81
|
+
factory_girl (2.0.0.beta2)
|
82
|
+
ffi (1.0.9)
|
83
|
+
gherkin (2.4.1)
|
84
|
+
json (>= 1.4.6)
|
85
|
+
hike (1.1.0)
|
86
|
+
i18n (0.6.0)
|
87
|
+
jquery-rails (1.0.11)
|
88
|
+
railties (~> 3.0)
|
89
|
+
thor (~> 0.14)
|
90
|
+
json (1.5.2)
|
91
|
+
json_pure (1.5.2)
|
92
|
+
mail (2.3.0)
|
93
|
+
i18n (>= 0.4.0)
|
94
|
+
mime-types (~> 1.16)
|
95
|
+
treetop (~> 1.4.8)
|
96
|
+
mime-types (1.16)
|
97
|
+
mongo (1.3.1)
|
98
|
+
bson (>= 1.3.1)
|
99
|
+
mongoid (2.0.2)
|
100
|
+
activemodel (~> 3.0)
|
101
|
+
mongo (~> 1.3)
|
102
|
+
tzinfo (~> 0.3.22)
|
103
|
+
multi_json (1.0.3)
|
104
|
+
nokogiri (1.4.6)
|
105
|
+
polyglot (0.3.1)
|
106
|
+
rack (1.3.0)
|
107
|
+
rack-cache (1.0.2)
|
108
|
+
rack (>= 0.4)
|
109
|
+
rack-mount (0.8.1)
|
110
|
+
rack (>= 1.0.0)
|
111
|
+
rack-ssl (1.3.2)
|
112
|
+
rack
|
113
|
+
rack-test (0.6.0)
|
114
|
+
rack (>= 1.0)
|
115
|
+
rails (3.1.0.rc4)
|
116
|
+
actionmailer (= 3.1.0.rc4)
|
117
|
+
actionpack (= 3.1.0.rc4)
|
118
|
+
activerecord (= 3.1.0.rc4)
|
119
|
+
activeresource (= 3.1.0.rc4)
|
120
|
+
activesupport (= 3.1.0.rc4)
|
121
|
+
bundler (~> 1.0)
|
122
|
+
railties (= 3.1.0.rc4)
|
123
|
+
railties (3.1.0.rc4)
|
124
|
+
actionpack (= 3.1.0.rc4)
|
125
|
+
activesupport (= 3.1.0.rc4)
|
126
|
+
rack-ssl (~> 1.3.2)
|
127
|
+
rake (>= 0.8.7)
|
128
|
+
rdoc (~> 3.4)
|
129
|
+
thor (~> 0.14.6)
|
130
|
+
rake (0.9.2)
|
131
|
+
rdiscount (1.6.8)
|
132
|
+
rdoc (3.6.1)
|
133
|
+
rspec (2.6.0)
|
134
|
+
rspec-core (~> 2.6.0)
|
135
|
+
rspec-expectations (~> 2.6.0)
|
136
|
+
rspec-mocks (~> 2.6.0)
|
137
|
+
rspec-core (2.6.4)
|
138
|
+
rspec-expectations (2.6.0)
|
139
|
+
diff-lcs (~> 1.1.2)
|
140
|
+
rspec-mocks (2.6.0)
|
141
|
+
rspec-rails (2.6.1)
|
142
|
+
actionpack (~> 3.0)
|
143
|
+
activesupport (~> 3.0)
|
144
|
+
railties (~> 3.0)
|
145
|
+
rspec (~> 2.6.0)
|
146
|
+
rubyzip (0.9.4)
|
147
|
+
sass (3.1.3)
|
148
|
+
selenium-webdriver (0.2.1)
|
149
|
+
childprocess (>= 0.1.7)
|
150
|
+
ffi (>= 1.0.7)
|
151
|
+
json_pure
|
152
|
+
rubyzip
|
153
|
+
sprockets (2.0.0.beta.10)
|
154
|
+
hike (~> 1.0)
|
155
|
+
rack (~> 1.0)
|
156
|
+
tilt (!= 1.3.0, ~> 1.1)
|
157
|
+
sqlite3 (1.3.3)
|
158
|
+
sqlite3-ruby (1.3.3)
|
159
|
+
sqlite3 (>= 1.3.3)
|
160
|
+
term-ansicolor (1.0.5)
|
161
|
+
thor (0.14.6)
|
162
|
+
tilt (1.3.2)
|
163
|
+
treetop (1.4.9)
|
164
|
+
polyglot (>= 0.3.1)
|
165
|
+
turn (0.8.2)
|
166
|
+
ansi (>= 1.2.2)
|
167
|
+
tzinfo (0.3.28)
|
168
|
+
uglifier (0.5.4)
|
169
|
+
execjs (>= 0.3.0)
|
170
|
+
multi_json (>= 1.0.2)
|
171
|
+
xpath (0.1.4)
|
172
|
+
nokogiri (~> 1.3)
|
173
|
+
|
174
|
+
PLATFORMS
|
175
|
+
ruby
|
176
|
+
|
177
|
+
DEPENDENCIES
|
178
|
+
aruba (>= 0.4.1)
|
179
|
+
bson_ext (>= 1.3.1)
|
180
|
+
bundler (>= 1.0.15)
|
181
|
+
coffee-script (>= 2.2.0)
|
182
|
+
cucumber-rails!
|
183
|
+
database_cleaner (>= 0.6.7)
|
184
|
+
factory_girl (>= 2.0.0.beta2)
|
185
|
+
jquery-rails (>= 1.0.9)
|
186
|
+
mongoid (>= 2.0.2)
|
187
|
+
rails (>= 3.1.0.rc4)
|
188
|
+
rake (>= 0.9.2)
|
189
|
+
rspec (>= 2.6.0)
|
190
|
+
rspec-rails (>= 2.6.1)
|
191
|
+
sass (>= 3.1.1)
|
192
|
+
sqlite3-ruby (>= 1.3.3)
|
193
|
+
turn (>= 0.8.2)
|
194
|
+
uglifier (>= 0.5.4)
|
data/History.txt
CHANGED
@@ -1,4 +1,104 @@
|
|
1
|
-
== 0.
|
1
|
+
== 0.5.2 2011-06-07
|
2
|
+
|
3
|
+
=== New Features
|
4
|
+
* Upgraded to Capybara 1.0.0.rc1 (Aslak Hellesøy)
|
5
|
+
* Add stats to generator (#144 Aslak Hellesøy)
|
6
|
+
|
7
|
+
== 0.5.1 2011-05-25
|
8
|
+
|
9
|
+
=== Bugfixes
|
10
|
+
* Mixed DB access feature for @javascript drivers (#142 Alexander Mankuta)
|
11
|
+
* cucumber:feature and integers. not creating feature correctly (#30 John Ivanoff, Aslak Hellesøy)
|
12
|
+
* New project can't find capybara's "visit" (#143 Aslak Hellesøy)
|
13
|
+
* rails generate cucumber:install attempts double run (#140 Aslak Hellesøy)
|
14
|
+
|
15
|
+
== 0.5.0 2011-05-17
|
16
|
+
|
17
|
+
=== Bugfixes
|
18
|
+
* undefined method `add_assertion' for nil:NilClass (#96, #97, #98 Aslak Hellesøy)
|
19
|
+
* Capybara name error from env.rb (#125 Aslak Hellesøy)
|
20
|
+
* Fixed date-localization bug (#138 Michael Opitz)
|
21
|
+
|
22
|
+
== 0.5.0.beta1 2011-05-08
|
23
|
+
|
24
|
+
=== Removed features
|
25
|
+
* Dropped support for Rails 2 (Aslak Hellesøy)
|
26
|
+
* Dropped support for Webrat (Aslak Hellesøy)
|
27
|
+
* Removed database cleaner strategy overrides (#134 Daniel Morrison, Daniel Duvall)
|
28
|
+
|
29
|
+
=== Improvements
|
30
|
+
* Upgrade to Capybara 1.0.0.beta1 or newer (#129, #130 Simon Menke, Klaus Hartl, Aslak Hellesøy)
|
31
|
+
* Generated paths.rb cleanup (#133 Tim Pope)
|
32
|
+
* Allow css pseudo-classes in scopers (#122 twalpole)
|
33
|
+
|
34
|
+
== 0.4.1 2011-04-05
|
35
|
+
|
36
|
+
=== Bugfixes
|
37
|
+
* Fixed incorrect warning in generated files. (#115 Emanuele Vicentini)
|
38
|
+
* Fixed incorrect hooks for DatabaseCleaner (#113 Markus Bengts)
|
39
|
+
* Throw an error if the user forgot to add DatabaseCleaner to the Gemfile, allowing them to decide whether or not to use it. (#36 Aslak Hellesøy, Ryan Bigg)
|
40
|
+
|
41
|
+
== 0.4.0 2011-03-20
|
42
|
+
|
43
|
+
=== New Features
|
44
|
+
* Add selectors helper (#63 Bodaniel Jeanes)
|
45
|
+
* Capybara date stepdefs (#66 Rob Holland)
|
46
|
+
* The World now includes Rack::Test::Methods, allowing get, post, put delete (Aslak Hellesøy)
|
47
|
+
|
48
|
+
=== Bugfixes
|
49
|
+
* Allow setting rails root (#102, #103, Fabio Kreusch)
|
50
|
+
* Fix Date selection steps and helpers (#93, #99, #100, #101, #109 James Herdman, John Ferlito, twalpole, Geoff Drake, Ricky Robinson, Michael Fleet)
|
51
|
+
* Can not run cucumber-rails (0.4.0.beta.1) with cucumber (0.10.0) (#89 Aslak Hellesøy)
|
52
|
+
* Installing cucumber-rails without a database.yml fails (#61 Aslak Hellesøy)
|
53
|
+
* Fix #click_link compatibility with Capybara 0.4. (#54, #77, #78, #80 Aslak Hellesøy)
|
54
|
+
* Support for projects using other ORMs than ActiveRecord (or nothing at all). (#18, #22, #46, #85, #86, #87, #90 Aslak Hellesøy)
|
55
|
+
* @allow-rescue not working in rails 3 (#31 Joe Ferris, Aslak Hellesøy)
|
56
|
+
* Gem dependency on Nokogiri (for #tableish). (#53 Aslak Hellesøy)
|
57
|
+
|
58
|
+
=== Removed Features
|
59
|
+
* Automatic detection of RSpec, Capybara and Webrat for install generator. Set gems explicitly in your Gemfile (Rails3) or environment.rb (Rails2)
|
60
|
+
* Then /^(?:|I )should see JSON:$/. Use #get and #last_response instead. See features/rails3.feature. (Aslak Hellesøy)
|
61
|
+
* Cucumber::Rails::World.use_transactional_fixtures. TODO: Explain what to do instead.
|
62
|
+
No more Cucumber::Rails::World.use_transactional_fixtures = false. Use DatabaseCleaner.strategy = :none instead
|
63
|
+
|
64
|
+
== 0.3.2 2010-06-06
|
65
|
+
|
66
|
+
== Changed features
|
67
|
+
* web_steps.rb uses "([^"]*)" instead of "([^\"]*)" (Aslak Hellesøy)
|
68
|
+
* Renamed cucumber:skeleton to cucumber:install (Rails 3 generator). (Aslak Hellesøy)
|
69
|
+
* Upgraded to be compatible with rspec 2.0.0.beta.10 (#35 Gabor Ratky, Pete Yandell)
|
70
|
+
|
71
|
+
== 0.3.1 2010-05-03
|
72
|
+
|
73
|
+
This release has a lot of bugfixes! The test suite (based on Aruba) verifies that Cucumber-Rails
|
74
|
+
now works with various combinations of:
|
75
|
+
|
76
|
+
* Cucumber 0.6.x/0.7.2
|
77
|
+
* Rails2/Rails3
|
78
|
+
* RSpec1/RSpec2/Test-Unit/Mini-Uint
|
79
|
+
* Webrat/CapyBara
|
80
|
+
* MRI 1.8.6/1.8.7/1.9.1
|
81
|
+
|
82
|
+
This one requires a special mention: The handy (but error prone) rerun functionality has moved to a
|
83
|
+
separate rerun profile, so all rerun.txt related issues should now be gone.
|
84
|
+
|
85
|
+
== New features
|
86
|
+
* New Capybara Step Definitions for Dates. (Rob Holland)
|
87
|
+
* Steps now recognise "Given I am on the users page" etc. (Solomon White)
|
88
|
+
* Relegate rerun to its own profile and rake task (Mike Sassak)
|
89
|
+
* Added new Then /^(?:|I )should see JSON:$/ step definition to Capybara - useful for REST. (Aslak Hellesøy)
|
90
|
+
* The #tableish method now understands tables with colspan and rowspan
|
91
|
+
* Support RSpec 2 (Johan Kiviniemi, Aslak Hellesøy, Rolf Bjaanes)
|
92
|
+
* Added @no-js-emulation, which turns off javascript emulation for delete links when not using browser testing. (Rob Holland, Aslak Hellesøy)
|
93
|
+
* Korean translation (Shim Taewon)
|
94
|
+
|
95
|
+
=== Bugfixes
|
96
|
+
* No longer need to install the test-unit gem on 1.9.1 (Aslak Hellesøy)
|
97
|
+
* capybara rack-test field should contain step support for textarea (#28 Nicholas Rutherford)
|
98
|
+
* "Rspec is not missing constant Matchers!" error. (#27 David Chelimsky, Aslak Hellesøy)
|
99
|
+
* @culerity tag breaks Rails 3 RESTful helpers (#17 Aslak Hellesøy)
|
100
|
+
|
101
|
+
== 0.3.0 2010-02-25
|
2
102
|
|
3
103
|
This is a major release since we're now supporting both Rails 3 and RSpec 2. Older versions
|
4
104
|
(Rails 2 and RSpec 1) are still supported.
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2008,2009,2010 Aslak Hellesøy and the Cucumber Team.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# Cucumber-Rails
|
2
|
+
|
3
|
+
Cucumber-Rails brings Cucumber to Rails3. It contains 2 generators - one
|
4
|
+
for bootstrapping your Rails app for Cucumber, and a second one for generating features.
|
5
|
+
|
6
|
+
Cucumber-Rails also contains Cucumber Step Definitions that wrap Capybara,
|
7
|
+
giving you a head start for writing Cucumber features against your Rails app.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Before you can use the generator, add the gem to your project's Gemfile as follows:
|
12
|
+
|
13
|
+
group :test do
|
14
|
+
gem 'cucumber-rails'
|
15
|
+
# database_cleaner is not required, but highly recommended
|
16
|
+
gem 'database_cleaner'
|
17
|
+
end
|
18
|
+
|
19
|
+
Then install it by running:
|
20
|
+
|
21
|
+
bundle install
|
22
|
+
|
23
|
+
Learn about the various options:
|
24
|
+
|
25
|
+
rails generate cucumber:install --help
|
26
|
+
|
27
|
+
Finally, bootstrap your Rails app, for example:
|
28
|
+
|
29
|
+
rails generate cucumber:install
|
30
|
+
|
31
|
+
## Generating a Cucumber feature
|
32
|
+
|
33
|
+
IMPORTANT: Only do this if you are new to Cucumber. We recommend you write your
|
34
|
+
Cucumber features by hand once you get the hang of it.
|
35
|
+
|
36
|
+
Example:
|
37
|
+
|
38
|
+
rails generate cucumber:feature post title:string body:text published:boolean
|
39
|
+
rails generate scaffold post title:string body:text published:boolean
|
40
|
+
rake db:migrate
|
41
|
+
rake cucumber
|
42
|
+
|
43
|
+
## Running Cucumber
|
44
|
+
|
45
|
+
With Rake:
|
46
|
+
|
47
|
+
rake cucumber
|
48
|
+
|
49
|
+
Without Rake:
|
50
|
+
|
51
|
+
[bundle exec] cucumber
|
52
|
+
|
53
|
+
## Bugs and feature requests
|
54
|
+
|
55
|
+
The *only* way to have a bug fixed or a new feature accepted is to describe it with a Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator. Fork this project, clone it to your workstation and check out a branch with a descriptive name:
|
56
|
+
|
57
|
+
git clone git@github.com:you/cucumber-rails.git
|
58
|
+
git checkout -b bug-install-generator
|
59
|
+
|
60
|
+
Start by making sure you can run the existing features. Now, create a feature that demonstrates what's wrong. See the existing features for examples. When you have a failing feature that reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team will review it and hopefully create a fix.
|
61
|
+
|
62
|
+
If you know how to fix the bug yourself, make a second commit (after committing the failing feature) before you send the pull request.
|
63
|
+
|
64
|
+
### Setting up your environment
|
65
|
+
|
66
|
+
I strongly recommend rvm and ruby 1.9.2. When you have that, cd into your cucumber-rails repository and:
|
67
|
+
|
68
|
+
gem install bundler
|
69
|
+
bundle install
|
70
|
+
|
71
|
+
### Running all features
|
72
|
+
|
73
|
+
With all dependencies installed, all features should pass:
|
74
|
+
|
75
|
+
rake cucumber
|
76
|
+
|
77
|
+
One of the features uses MongoDB, which needs to be running in order to make features/mongoid.feature to pass.
|
data/Rakefile
CHANGED
@@ -1,23 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
Jeweler::Tasks.new do |gemspec|
|
6
|
-
gemspec.name = "cucumber-rails"
|
7
|
-
gemspec.summary = "Cucumber Generators and Runtime for Rails"
|
8
|
-
gemspec.description = "Cucumber Generators and Runtime for Rails"
|
9
|
-
gemspec.email = "cukes@googlegroups.com"
|
10
|
-
gemspec.homepage = "http://cukes.info"
|
11
|
-
gemspec.authors = ["Dennis Blöte", "Aslak Hellesøy", "Rob Holland"]
|
12
|
-
gemspec.homepage = "http://github.com/aslakhellesoy/cucumber-rails"
|
13
|
-
|
14
|
-
gemspec.add_dependency 'cucumber', '>= 0.6.2'
|
15
|
-
gemspec.add_development_dependency 'aruba', '>= 0.1.5'
|
16
|
-
end
|
17
|
-
Jeweler::GemcutterTasks.new
|
18
|
-
rescue LoadError
|
19
|
-
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
20
|
-
end
|
2
|
+
require 'rubygems'
|
3
|
+
require 'bundler/setup'
|
4
|
+
Bundler::GemHelper.install_tasks
|
21
5
|
|
22
6
|
$:.unshift(File.dirname(__FILE__) + '/lib')
|
23
7
|
Dir["#{File.dirname(__FILE__)}/dev_tasks/*.rake"].sort.each { |ext| load ext }
|
data/config/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
default: --tags ~@broken
|
data/cucumber-rails.gemspec
CHANGED
@@ -1,108 +1,44 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
5
3
|
|
6
4
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
5
|
+
s.name = 'cucumber-rails'
|
6
|
+
s.version = '1.0.0'
|
7
|
+
s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"]
|
8
|
+
s.description = "Cucumber Generators and Runtime for Rails"
|
9
|
+
s.summary = "#{s.name}-#{s.version}"
|
10
|
+
s.email = 'cukes@googlegroups.com'
|
11
|
+
s.homepage = "http://cukes.info"
|
9
12
|
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
|
17
|
-
|
18
|
-
s.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
"cucumber-rails.gemspec",
|
27
|
-
"dev_tasks/cucumber.rake",
|
28
|
-
"dev_tasks/rspec.rake",
|
29
|
-
"features/rails2.feature",
|
30
|
-
"features/rails3.feature",
|
31
|
-
"features/step_definitions/cucumber_rails_steps.rb",
|
32
|
-
"features/support/env.rb",
|
33
|
-
"features/support/matchers/files.rb",
|
34
|
-
"generators/cucumber/USAGE",
|
35
|
-
"generators/cucumber/cucumber_generator.rb",
|
36
|
-
"generators/cucumber/templates/step_definitions/web_steps_ja.rb.erb",
|
37
|
-
"generators/feature/USAGE",
|
38
|
-
"generators/feature/feature_generator.rb",
|
39
|
-
"lib/cucumber/rails/action_controller.rb",
|
40
|
-
"lib/cucumber/rails/active_record.rb",
|
41
|
-
"lib/cucumber/rails/capybara_javascript_emulation.rb",
|
42
|
-
"lib/cucumber/rails/rspec.rb",
|
43
|
-
"lib/cucumber/rails/test_unit.rb",
|
44
|
-
"lib/cucumber/rails/world.rb",
|
45
|
-
"lib/cucumber/web/tableish.rb",
|
46
|
-
"lib/generators/cucumber/feature/USAGE",
|
47
|
-
"lib/generators/cucumber/feature/feature_base.rb",
|
48
|
-
"lib/generators/cucumber/feature/feature_generator.rb",
|
49
|
-
"lib/generators/cucumber/feature/named_arg.rb",
|
50
|
-
"lib/generators/cucumber/skeleton/USAGE",
|
51
|
-
"lib/generators/cucumber/skeleton/skeleton_base.rb",
|
52
|
-
"lib/generators/cucumber/skeleton/skeleton_generator.rb",
|
53
|
-
"rvm.yml",
|
54
|
-
"spec/cucumber/web/tableish_spec.rb",
|
55
|
-
"spec/generators/cucumber/skeleton/skeleton_base_spec.rb",
|
56
|
-
"spec/spec.opts",
|
57
|
-
"spec/spec_helper.rb",
|
58
|
-
"templates/feature/feature.erb",
|
59
|
-
"templates/feature/steps.erb",
|
60
|
-
"templates/skeleton/config/cucumber.yml.erb",
|
61
|
-
"templates/skeleton/environments/cucumber.rb.erb",
|
62
|
-
"templates/skeleton/script/cucumber",
|
63
|
-
"templates/skeleton/step_definitions/capybara_steps.rb.erb",
|
64
|
-
"templates/skeleton/step_definitions/web_steps_cs.rb.erb",
|
65
|
-
"templates/skeleton/step_definitions/web_steps_da.rb.erb",
|
66
|
-
"templates/skeleton/step_definitions/web_steps_de.rb.erb",
|
67
|
-
"templates/skeleton/step_definitions/web_steps_es.rb.erb",
|
68
|
-
"templates/skeleton/step_definitions/web_steps_no.rb.erb",
|
69
|
-
"templates/skeleton/step_definitions/web_steps_pt-BR.rb.erb",
|
70
|
-
"templates/skeleton/step_definitions/webrat_steps.rb.erb",
|
71
|
-
"templates/skeleton/support/_rails_each_run.rb",
|
72
|
-
"templates/skeleton/support/_rails_prefork.rb.erb",
|
73
|
-
"templates/skeleton/support/capybara.rb",
|
74
|
-
"templates/skeleton/support/edit_warning.txt",
|
75
|
-
"templates/skeleton/support/paths.rb",
|
76
|
-
"templates/skeleton/support/rails.rb.erb",
|
77
|
-
"templates/skeleton/support/rails_spork.rb.erb",
|
78
|
-
"templates/skeleton/support/webrat.rb",
|
79
|
-
"templates/skeleton/tasks/cucumber.rake.erb"
|
80
|
-
]
|
81
|
-
s.homepage = %q{http://github.com/aslakhellesoy/cucumber-rails}
|
82
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
83
|
-
s.require_paths = ["lib"]
|
84
|
-
s.rubygems_version = %q{1.3.6}
|
85
|
-
s.summary = %q{Cucumber Generators and Runtime for Rails}
|
86
|
-
s.test_files = [
|
87
|
-
"spec/cucumber/web/tableish_spec.rb",
|
88
|
-
"spec/generators/cucumber/skeleton/skeleton_base_spec.rb",
|
89
|
-
"spec/spec_helper.rb"
|
90
|
-
]
|
13
|
+
s.add_dependency('cucumber', '~> 1.0.0')
|
14
|
+
s.add_dependency('rack-test', '>= 0.5.7')
|
15
|
+
s.add_dependency('nokogiri', '>= 1.4.4')
|
16
|
+
s.add_dependency('capybara', '>= 1.0.0')
|
17
|
+
s.add_development_dependency('rails', '>= 3.1.0.rc4')
|
18
|
+
s.add_development_dependency('rake', '>= 0.9.2')
|
19
|
+
s.add_development_dependency('bundler', '>= 1.0.15')
|
20
|
+
s.add_development_dependency('aruba', '>= 0.4.1')
|
21
|
+
s.add_development_dependency('sqlite3-ruby', '>= 1.3.3')
|
22
|
+
s.add_development_dependency('rspec', '>= 2.6.0')
|
23
|
+
s.add_development_dependency('rspec-rails', '>= 2.6.1')
|
24
|
+
s.add_development_dependency('factory_girl', '>= 2.0.0.beta2')
|
25
|
+
s.add_development_dependency('database_cleaner', '>= 0.6.7')
|
26
|
+
s.add_development_dependency('mongoid', '>= 2.0.2')
|
27
|
+
s.add_development_dependency('bson_ext', '>= 1.3.1')
|
28
|
+
# s.add_development_dependency('akephalos', '>= 0.2.5')
|
91
29
|
|
92
|
-
|
93
|
-
|
94
|
-
|
30
|
+
# Various Stuff that Rails 3.1 puts inside apps.
|
31
|
+
s.add_development_dependency('turn', '>= 0.8.2')
|
32
|
+
s.add_development_dependency('sass', '>= 3.1.1')
|
33
|
+
s.add_development_dependency('coffee-script', '>= 2.2.0')
|
34
|
+
s.add_development_dependency('uglifier', '>= 0.5.4')
|
35
|
+
s.add_development_dependency('jquery-rails', '>= 1.0.9')
|
95
36
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
else
|
104
|
-
s.add_dependency(%q<cucumber>, [">= 0.6.2"])
|
105
|
-
s.add_dependency(%q<aruba>, [">= 0.1.5"])
|
106
|
-
end
|
37
|
+
s.rubygems_version = ">= 1.6.1"
|
38
|
+
s.files = `git ls-files`.split("\n")
|
39
|
+
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
40
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
41
|
+
s.extra_rdoc_files = ["LICENSE", "README.md", "History.txt"]
|
42
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.require_path = "lib"
|
107
44
|
end
|
108
|
-
|
data/dev_tasks/cucumber.rake
CHANGED
data/dev_tasks/rspec.rake
CHANGED
@@ -1,13 +1,8 @@
|
|
1
|
-
|
2
|
-
require 'spec/rake/spectask'
|
1
|
+
require 'rspec/core/rake_task'
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
|
10
|
-
end
|
11
|
-
rescue LoadError
|
12
|
-
task :spec
|
3
|
+
desc "Run RSpec"
|
4
|
+
RSpec::Core::RakeTask.new do |t|
|
5
|
+
t.rcov = ENV['RCOV']
|
6
|
+
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
|
7
|
+
t.verbose = true
|
13
8
|
end
|