cucumber-rails 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,22 @@
1
- == 0.2.1
1
+ == 0.2.2 2009-12-21
2
+
3
+ === Bugfixes
4
+ * Fix bad link in gemspec. (Aslak Hellesøy)
5
+ * Unified file attaching step names. (Jiří Zajpt)
6
+ * Fix typos in variable names in several step definitions. (Jiří Zajpt)
7
+ * cucumber.rake finds the wrong vendored cucumber when a plugin name starts with "cucumber" (#4 James Herdman, Paco Benavent, Aslak Hellesøy)
8
+
9
+ === New features
10
+ * Czech translations. (Jiří Zajpt)
11
+
12
+ == 0.2.1 2009-12-15
2
13
 
3
14
  Small bugfix release
4
15
 
5
16
  === Bugfixes
6
17
  * Made sure database_cleaner is always set up as a dependency in config/environments/cucumber.rb. (Aslak Hellesøy)
7
18
 
8
- == 0.2.0
19
+ == 0.2.0 2009-12-14
9
20
 
10
21
  This is the first release of cucumber-rails, which was factored out of cucumber.
11
22
  We're calling it 0.2.0 just because we did some prereleases in the 0.1 series,
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ begin
7
7
  gemspec.email = "cukes@googlegroups.com"
8
8
  gemspec.homepage = "http://cukes.info"
9
9
  gemspec.authors = ["Dennis Blöte", "Aslak Hellesøy", "Rob Holland"]
10
- gemspec.homepage = "http://github.com/dbloete/cucumber-rails"
10
+ gemspec.homepage = "http://github.com/aslakhellesoy/cucumber-rails"
11
11
 
12
12
  gemspec.add_dependency 'cucumber', '>= 0.5.1'
13
13
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cucumber-rails}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dennis Bl\303\266te", "Aslak Helles\303\270y", "Rob Holland"]
12
- s.date = %q{2009-12-16}
12
+ s.date = %q{2009-12-21}
13
13
  s.description = %q{Cucumber Generators and Runtime for Rails}
14
14
  s.email = %q{cukes@googlegroups.com}
15
15
  s.extra_rdoc_files = [
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
28
28
  "generators/cucumber/templates/environments/cucumber.rb.erb",
29
29
  "generators/cucumber/templates/script/cucumber",
30
30
  "generators/cucumber/templates/step_definitions/capybara_steps.rb.erb",
31
+ "generators/cucumber/templates/step_definitions/web_steps_cs.rb.erb",
31
32
  "generators/cucumber/templates/step_definitions/web_steps_de.rb.erb",
32
33
  "generators/cucumber/templates/step_definitions/web_steps_no.rb.erb",
33
34
  "generators/cucumber/templates/step_definitions/web_steps_pt-BR.rb.erb",
@@ -56,7 +57,7 @@ Gem::Specification.new do |s|
56
57
  "spec/spec_helper.rb",
57
58
  "tasks/rspec.rake"
58
59
  ]
59
- s.homepage = %q{http://github.com/dbloete/cucumber-rails}
60
+ s.homepage = %q{http://github.com/aslakhellesoy/cucumber-rails}
60
61
  s.rdoc_options = ["--charset=UTF-8"]
61
62
  s.require_paths = ["lib"]
62
63
  s.rubygems_version = %q{1.3.5}
@@ -23,7 +23,7 @@ class CucumberGenerator < Rails::Generator::Base
23
23
  exit(1)
24
24
  end
25
25
  if File.exist?('features/support/version_check.rb')
26
- STDERR.puts "Please remove features/support/version_check\n" +
26
+ STDERR.puts "Please remove features/support/version_check.rb\n" +
27
27
  "See upgrading instructions for 0.2.0 in History.txt"
28
28
  exit(1)
29
29
  end
@@ -1,15 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- vendored_cucumber_binary = Dir[File.join(File.dirname(__FILE__),
4
- '..',
5
- 'vendor',
6
- '{gems,plugins}',
7
- 'cucumber*',
8
- 'bin',
9
- 'cucumber')].first
10
-
11
- if vendored_cucumber_binary
12
- load File.expand_path(vendored_cucumber_binary)
3
+ vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
4
+ if vendored_cucumber_bin
5
+ load File.expand_path(vendored_cucumber_bin)
13
6
  else
14
7
  require 'rubygems' unless ENV['NO_RUBYGEMS']
15
8
  require 'cucumber'
@@ -84,7 +84,7 @@ When /^(?:|I )choose "([^\"]*)"(?: within "([^\"]*)")?$/ do |field, selector|
84
84
  end
85
85
  end
86
86
 
87
- When /^(?:|I )attach the file at "([^\"]*)" to "([^\"]*)"(?: within "([^\"]*)")?$/ do |path, field, selector|
87
+ When /^(?:|I )attach the file "([^\"]*)" to "([^\"]*)"(?: within "([^\"]*)")?$/ do |path, field, selector|
88
88
  with_scope(selector) do
89
89
  attach_file(field, path)
90
90
  end
@@ -0,0 +1,136 @@
1
+ # encoding: utf-8
2
+ <%= embed_file('support/edit_warning.txt') %>
3
+
4
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
+
6
+ Given /^jsem na (.+)$/ do |page_name|
7
+ Given %{I am on #{page_name}}
8
+ end
9
+
10
+ When /^jdu na (.+)$/ do |page_name|
11
+ When %{I go to #{page_name}}
12
+ end
13
+
14
+ When /^stisknu tlačítko "([^\"]*)"$/ do |button|
15
+ When %{I press "#{button}"}
16
+ end
17
+
18
+ When /^kliknu na "([^\"]*)"$/ do |link|
19
+ When %{I follow "#{link}"}
20
+ end
21
+
22
+ When /^kliknu na "([^\"]*)" uvnitř "([^\"]*)"$/ do |link, parent|
23
+ When %{I follow "#{link}" within "#{parent}"}
24
+ end
25
+
26
+ When /^vyplním pole "([^\"]*)" hodnotou "([^\"]*)"$/ do |field, value|
27
+ When %{I fill in "#{field}" with "#{value}"}
28
+ end
29
+
30
+ When /^vyplním "([^\"]*)" do pole "([^\"]*)"$/ do |value, field|
31
+ When %{I fill in "#{value}" for "#{field}"}
32
+ end
33
+
34
+ When /^vyplním následující:$/ do |fields|
35
+ When %{I fill in the following:}, fields
36
+ end
37
+
38
+ When /^vyberu "([^\"]*)" z "([^\"]*)"$/ do |value, field|
39
+ When %{I select "#{value}" from "#{field}"}
40
+ end
41
+
42
+ When /^vyberu "([^\"]*)" jako datum a čas$/ do |time|
43
+ When %{I select "#{time}" as the date and time}
44
+ end
45
+
46
+ When /^vyberu "([^\"]*)" jako "([^\"]*)" datum a čas$/ do |datetime, datetime_label|
47
+ When %{I select "#{detetime}" as the "#{datetime_label}" date and time}
48
+ end
49
+
50
+ When /^vyberu "([^\"]*)" jako čas$/ do |time|
51
+ When %{I select "#{time}" as the time}
52
+ end
53
+
54
+ When /^vyberu "([^\"]*)" jako "([^\"]*)" čas$/ do |time, time_label|
55
+ When %{I select "#{time}" as the "#{time_label}" time}
56
+ end
57
+
58
+ When /^vyberu cd jako datum$/ do |date|
59
+ When %{I select "#{date}" as the date}
60
+ end
61
+
62
+ When /^vyberu "([^\"]*)" jako "([^\"]*)" datum$/ do |date, date_label|
63
+ When %{I select "#{date}" as the "#{date_label}" date}
64
+ end
65
+
66
+ When /^zaškrtnu "([^\"]*)"$/ do |field|
67
+ When %{I check "#{field}"}
68
+ end
69
+
70
+ When /^vyškrtnu "([^\"]*)"$/ do |field|
71
+ When %{I uncheck "#{field}"}
72
+ end
73
+
74
+ When /^vyberu "([^\"]*)"$/ do |field|
75
+ When %{I choose "#{field}"}
76
+ end
77
+
78
+ When /^připojím soubor "([^\"]*)" do pole "([^\"]*)"$/ do |path, field|
79
+ When %{I attach the file "#{path}" to "#{field}"}
80
+ end
81
+
82
+ Then /^(?:|také )bych měl vidět "([^\"]*)"$/ do |text|
83
+ Then %{I should see "#{text}"}
84
+ end
85
+
86
+ Then /^(?:|také )bych měl vidět "([^\"]*)" uvnitř "([^\"]*)"$/ do |text, selector|
87
+ Then %{I should see "#{text}" within "#{selector}"}
88
+ end
89
+
90
+ Then /^(?:|také )bych měl vidět \/([^\/]*)\/$/ do |regexp|
91
+ Then %{I should see /#{regexp}/}
92
+ end
93
+
94
+ Then /^(?:|také )bych měl vidět \/([^\/]*)\/ uvnitř "([^\"]*)"$/ do |regexp, selector|
95
+ Then %{I should see /#{regexp}/ within "#{selector}"}
96
+ end
97
+
98
+ Then /^(?:|také )bych neměl vidět "([^\"]*)"$/ do |text|
99
+ Then %{I should not see "#{text}"}
100
+ end
101
+
102
+ Then /^(?:|také )bych neměl vidět "([^\"]*)" uvnitř "([^\"]*)"$/ do |text, selector|
103
+ Then %{I should not see "#{text}" within "#{selector}"}
104
+ end
105
+
106
+ Then /^(?:|také )bych neměl vidět \/([^\/]*)\/$/ do |regexp|
107
+ Then %{I should not see /#{regexp}/}
108
+ end
109
+
110
+ Then /^(?:|také )bych neměl vidět \/([^\/]*)\/ uvnitř "([^\"]*)"$/ do |regexp, selector|
111
+ Then %{I should not see /#{regexp}/ within "#{selector}"}
112
+ end
113
+
114
+ Then /^pole "([^\"]*)" by mělo obsahovat "([^\"]*)"$/ do |field, value|
115
+ Then %{the "#{field}" field should contain "#{value}"}
116
+ end
117
+
118
+ Then /^pole "([^\"]*)" by nemělo obsahovat "([^\"]*)"$/ do |field, value|
119
+ Then %{the "#{field}" field should not contain "#{value}"}
120
+ end
121
+
122
+ Then /^pole "([^\"]*)" by mělo být zaškrtnuté$/ do |label|
123
+ Then %{the "#{label}" checkbox should be checked"}
124
+ end
125
+
126
+ Then /^pole "([^\"]*)" by nemělo být zaškrtnuté$/ do |label|
127
+ Then %{the "#{label}" checkbox should not be checked"}
128
+ end
129
+
130
+ Then /^(?:|také )bych měl být na (.+)$/ do |page_name|
131
+ Then %{I should be on #{page_name}}
132
+ end
133
+
134
+ Then /^(?:|také )mi ukaž stránku$/ do
135
+ Then %{show me the page}
136
+ end
@@ -76,7 +76,7 @@ When /^(?:|ich )"([^\"]*)" auswähle$/ do |field|
76
76
  end
77
77
 
78
78
  When /^(?:|ich )die Datei "([^\"]*)" als "([^\"]*)" anhänge$/ do |path, field|
79
- When %{I attach the file at "#{path}" to "#{field}"}
79
+ When %{I attach the file "#{path}" to "#{field}"}
80
80
  end
81
81
 
82
82
  Then /^(?:|ich sollte |sollte (?:|ich )?)"([^\"]*)" sehen$/ do |text|
@@ -88,11 +88,11 @@ Then /^(?:|ich sollte |sollte (?:|ich )?)"([^\"]*)" innerhalb "([^\"]*)" sehen$/
88
88
  end
89
89
 
90
90
  Then /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ sehen$/ do |regexp|
91
- Then %{I should see /#{text}/}
91
+ Then %{I should see /#{regexp}/}
92
92
  end
93
93
 
94
94
  Then /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ innerhalb "([^\"]*)" sehen$/ do |regexp, selector|
95
- Then %{I should see /#{text}/ within "#{selector}"}
95
+ Then %{I should see /#{regexp}/ within "#{selector}"}
96
96
  end
97
97
 
98
98
  Then /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^\"]*)" sehen$/ do |text|
@@ -104,11 +104,11 @@ Then /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^\"]*)" innerhalb "([^\"]*)" s
104
104
  end
105
105
 
106
106
  Then /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ sehen$/ do |regexp|
107
- Then %{I should not see /#{text}/}
107
+ Then %{I should not see /#{regexp}/}
108
108
  end
109
109
 
110
110
  Then /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ innerhalb "([^\"]*)" sehen$/ do |regexp, selector|
111
- Then %{I should not see /#{text}/ within "#{selector}"}
111
+ Then %{I should not see /#{regexp}/ within "#{selector}"}
112
112
  end
113
113
 
114
114
  Then /^sollte das "([^\"]*)" Feld "([^\"]*)" enthalten$/ do |field, value|
@@ -54,7 +54,7 @@ Når /^jeg velger "([^\"]*)"$/ do |field|
54
54
  end
55
55
 
56
56
  Når /^jeg legger ved filen "([^\"]*)" til "([^\"]*)"$/ do |path, field|
57
- When %{I attach the file at "#{path}" to "#{field}"}
57
+ When %{I attach the file "#{path}" to "#{field}"}
58
58
  end
59
59
 
60
60
  Så /^(?:skal jeg|jeg skal) se "([^\"]*)"$/ do |text|
@@ -65,12 +65,12 @@ Så /^(?:skal jeg|jeg skal) se "([^\"]*)" under "([^\"]*)"$/ do |text, selector|
65
65
  Then %{I should see "#{text}" within "#{selector}"}
66
66
  end
67
67
 
68
- Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/$/ do |text|
69
- Then %{I should see /#{text}/}
68
+ Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/$/ do |regexp|
69
+ Then %{I should see /#{regexp}/}
70
70
  end
71
71
 
72
- Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/ under "([^\"]*)"$/ do |text, selector|
73
- Then %{I should see /#{text}/ within "#{selector}"}
72
+ Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/ under "([^\"]*)"$/ do |regexp, selector|
73
+ Then %{I should see /#{regexp}/ within "#{selector}"}
74
74
  end
75
75
 
76
76
  Så /^(?:skal jeg|jeg skal) ikke se "([^\"]*)"$/ do |text|
@@ -81,12 +81,12 @@ Så /^(?:skal jeg|jeg skal) ikke se "([^\"]*)" under "([^\"]*)"$/ do |text, sele
81
81
  Then %{I should not see "#{text}" within "#{selector}"}
82
82
  end
83
83
 
84
- Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/$/ do |text|
85
- Then %{I should not see /#{text}/}
84
+ Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/$/ do |regexp|
85
+ Then %{I should not see /#{regexp}/}
86
86
  end
87
87
 
88
- Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/ under "([^\"]*)"$/ do |text, selector|
89
- Then %{I should not see /#{text}/ within "#{selector}"}
88
+ Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/ under "([^\"]*)"$/ do |regexp, selector|
89
+ Then %{I should not see /#{regexp}/ within "#{selector}"}
90
90
  end
91
91
 
92
92
  Så /^(?:skal )"([^\"]*)" feltet (?:skal )inneholde "([^\"]*)"$/ do |field, value|
@@ -80,7 +80,7 @@ Quando /^eu escolho "([^\"]*)"$/ do |field|
80
80
  end
81
81
 
82
82
  Quando /^eu anexo o arquivo em "([^\"]*)" a "([^\"]*)"$/ do |path, field|
83
- When %{I attach the file at "#{path}" to "#{field}"}
83
+ When %{I attach the file "#{path}" to "#{field}"}
84
84
  end
85
85
 
86
86
  Então /^eu devo ver "([^\"]*)"$/ do |text|
@@ -92,11 +92,11 @@ Então /^eu devo ver "([^\"]*)" dentro de "([^\"]*)"$/ do |text, selector|
92
92
  end
93
93
 
94
94
  Então /^eu devo ver \/([^\/]*)\/$/ do |regexp|
95
- Then %{I should see /#{text}/}
95
+ Then %{I should see /#{regexp}/}
96
96
  end
97
97
 
98
98
  Então /^eu devo ver \/([^\/]*)\/ dentro de "([^\"]*)"$/ do |regexp, selector|
99
- Then %{I should see /#{text}/ within "#{selector}"}
99
+ Then %{I should see /#{regexp}/ within "#{selector}"}
100
100
  end
101
101
 
102
102
  Então /^eu não devo ver "([^\"]*)"$/ do |text|
@@ -108,11 +108,11 @@ Então /^eu não devo ver "([^\"]*)" dentro de "([^\"]*)"$/ do |text, selector|
108
108
  end
109
109
 
110
110
  Então /^eu não devo ver \/([^\/]*)\/$/ do |regexp|
111
- Then %{I should not see /#{text}/}
111
+ Then %{I should not see /#{regexp}/}
112
112
  end
113
113
 
114
114
  Então /^eu não devo ver \/([^\/]*)\/ dentro de "([^\"]*)"$/ do |regexp, selector|
115
- Then %{I should not see /#{text}/ within "#{selector}"}
115
+ Then %{I should not see /#{regexp}/ within "#{selector}"}
116
116
  end
117
117
 
118
118
  Então /^o campo "([^\"]*)" deve conter "([^\"]*)"$/ do |field, value|
@@ -3,7 +3,7 @@ module NavigationHelpers
3
3
  #
4
4
  # When /^I go to (.+)$/ do |page_name|
5
5
  #
6
- # step definition in webrat_steps.rb
6
+ # step definition in web_steps.rb
7
7
  #
8
8
  def path_to(page_name)
9
9
  case page_name
@@ -12,7 +12,7 @@ module NavigationHelpers
12
12
  '/'
13
13
 
14
14
  # Add more mappings here.
15
- # Here is a more fancy example:
15
+ # Here is an example that pulls values out of the Regexp:
16
16
  #
17
17
  # when /^(.*)'s profile page$/i
18
18
  # user_profile_path(User.find_by_login($1))
@@ -1,26 +1,22 @@
1
- # This file was generated by
2
- # Find vendored gem or plugin of cucumber
3
- vendored_cucumber_dir = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*"].first
4
- $LOAD_PATH.unshift("#{vendored_cucumber_dir}/lib") unless vendored_cucumber_dir.nil?
1
+ <%= embed_file('support/edit_warning.txt') %>
5
2
 
6
- unless ARGV.any? {|a| a =~ /^gems/}
3
+ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
4
+
5
+ vendored_cucumber_bin = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
6
+ $LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
7
7
 
8
8
  begin
9
9
  require 'cucumber/rake/task'
10
10
 
11
- # Use vendored cucumber binary if possible. If it's not vendored,
12
- # Cucumber::Rake::Task will automatically use installed gem's cucumber binary
13
- vendored_cucumber_binary = "#{vendored_cucumber_dir}/bin/cucumber" unless vendored_cucumber_dir.nil?
14
-
15
11
  namespace :cucumber do
16
12
  Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
17
- t.binary = vendored_cucumber_binary
13
+ t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
18
14
  t.fork = true # You may get faster startup if you set this to false
19
15
  t.profile = 'default'
20
16
  end
21
17
 
22
18
  Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
23
- t.binary = vendored_cucumber_binary
19
+ t.binary = vendored_cucumber_bin
24
20
  t.fork = true # You may get faster startup if you set this to false
25
21
  t.profile = 'wip'
26
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Dennis Bl\xC3\xB6te"
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-12-16 00:00:00 +01:00
14
+ date: 2009-12-21 00:00:00 +01:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -45,6 +45,7 @@ files:
45
45
  - generators/cucumber/templates/environments/cucumber.rb.erb
46
46
  - generators/cucumber/templates/script/cucumber
47
47
  - generators/cucumber/templates/step_definitions/capybara_steps.rb.erb
48
+ - generators/cucumber/templates/step_definitions/web_steps_cs.rb.erb
48
49
  - generators/cucumber/templates/step_definitions/web_steps_de.rb.erb
49
50
  - generators/cucumber/templates/step_definitions/web_steps_no.rb.erb
50
51
  - generators/cucumber/templates/step_definitions/web_steps_pt-BR.rb.erb
@@ -73,7 +74,7 @@ files:
73
74
  - spec/spec_helper.rb
74
75
  - tasks/rspec.rake
75
76
  has_rdoc: true
76
- homepage: http://github.com/dbloete/cucumber-rails
77
+ homepage: http://github.com/aslakhellesoy/cucumber-rails
77
78
  licenses: []
78
79
 
79
80
  post_install_message: