aslakhellesoy-cucumber 0.1.99.9 → 0.1.99.10

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -57,6 +57,7 @@ Scenario Outlines, the rich command line, the nice output format and everything
57
57
  pure Ruby users have been enjoying for a while.
58
58
 
59
59
  == Bugfixes
60
+ * Errors with rspec-rails matchers in cucumber 0.1.99 (#173 David Chelimsky)
60
61
  * Can't use an empty string as a table value in a scenario outline (#172 Aslak Hellesøy)
61
62
  * Really skip skipped steps (#90 Aslak Hellesøy)
62
63
  * No output for multi-line strings (#71 Aslak Hellesøy)
data/Manifest.txt CHANGED
@@ -127,7 +127,7 @@ examples/test_unit/features/step_definitions/test_unit_steps.rb
127
127
  examples/test_unit/features/test_unit.feature
128
128
  examples/tickets/Rakefile
129
129
  examples/tickets/cucumber.yml
130
- examples/tickets/features/77.feature
130
+ examples/tickets/features/172.feature
131
131
  examples/tickets/features/lib/eatting_machine.rb
132
132
  examples/tickets/features/lib/pantry.rb
133
133
  examples/tickets/features/scenario_outline.feature
@@ -0,0 +1,28 @@
1
+ Feature: Login
2
+ To ensure the safety of the application
3
+ A regular user of the system
4
+ Must authenticate before using the app
5
+
6
+
7
+ Scenario Outline: Failed Login
8
+ Given the user "known_user"
9
+
10
+ When I go to the main page
11
+ Then I should see the login form
12
+
13
+ When I fill in "login" with "<login>"
14
+ And I fill in "password" with "<password>"
15
+ And I press "Log In"
16
+ Then the login request should fail
17
+ And I should see the error message "Login or Password incorrect"
18
+
19
+ Examples:
20
+ | login | password |
21
+ | | |
22
+ | unknown_user | |
23
+ | known_user | |
24
+ | | wrong_password |
25
+ | | known_userpass |
26
+ | unknown_user | wrong_password |
27
+ | unknown_user | known_userpass |
28
+ | known_user | wrong_password |
@@ -8,7 +8,7 @@ module Cucumber
8
8
  end
9
9
 
10
10
  def accept(visitor, status)
11
- rows.each_with_index do |row, n|
11
+ cells_rows.each_with_index do |row, n|
12
12
  should_visit = n == 0 ||
13
13
  row.at_lines?(visitor.current_feature_lines) ||
14
14
  @scenario_outline.at_header_or_step_lines?(visitor.current_feature_lines)
@@ -19,11 +19,11 @@ module Cucumber
19
19
  end
20
20
 
21
21
  def at_lines?(lines)
22
- rows.detect { |row| row.at_lines?(lines) }
22
+ cells_rows.detect { |row| row.at_lines?(lines) }
23
23
  end
24
24
 
25
25
  def accept(visitor, status)
26
- rows.each do |row|
26
+ cells_rows.each do |row|
27
27
  visitor.visit_table_row(row, status)
28
28
  end
29
29
  nil
@@ -42,7 +42,7 @@ module Cucumber
42
42
  # [{'a' => '2', 'b' => '3', 'sum' => '5'}, {'a' => '7', 'b' => '9', 'sum' => '16'}]
43
43
  #
44
44
  def hashes
45
- @hashes ||= rows[1..-1].map do |row|
45
+ @hashes ||= cells_rows[1..-1].map do |row|
46
46
  row.to_hash
47
47
  end
48
48
  end
@@ -68,7 +68,7 @@ module Cucumber
68
68
 
69
69
  # For testing only
70
70
  def to_sexp #:nodoc:
71
- [:table, *rows.map{|row| row.to_sexp}]
71
+ [:table, *cells_rows.map{|row| row.to_sexp}]
72
72
  end
73
73
 
74
74
  def to_hash(cells) #:nodoc:
@@ -80,7 +80,7 @@ module Cucumber
80
80
  end
81
81
 
82
82
  def index(cells) #:nodoc:
83
- rows.index(cells)
83
+ cells_rows.index(cells)
84
84
  end
85
85
 
86
86
  def arguments_replaced(arguments) #:nodoc:
@@ -98,7 +98,7 @@ module Cucumber
98
98
  end
99
99
 
100
100
  def at_lines?(lines)
101
- rows.detect{|row| row.at_lines?(lines)}
101
+ cells_rows.detect{|row| row.at_lines?(lines)}
102
102
  end
103
103
 
104
104
  private
@@ -107,7 +107,7 @@ module Cucumber
107
107
  columns[col].__send__(:width)
108
108
  end
109
109
 
110
- def rows
110
+ def cells_rows
111
111
  @rows ||= cell_matrix.map do |cell_row|
112
112
  @cells_class.new(self, cell_row)
113
113
  end
@@ -1,5 +1,8 @@
1
+ require 'cucumber/rails/world'
1
2
  require 'spec/expectations'
2
3
  require 'spec/rails/matchers'
3
4
 
4
- ActionController::Integration::Session.send(:include, Spec::Matchers)
5
- ActionController::Integration::Session.send(:include, Spec::Rails::Matchers)
5
+ Cucumber::Rails::World.class_eval do
6
+ include Spec::Matchers
7
+ include Spec::Rails::Matchers
8
+ end
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
5
  TINY = 99
6
- PATCH = 9 # Set to nil for official release
6
+ PATCH = 10 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
@@ -12,12 +12,12 @@ module Cucumber
12
12
  @table.extend(Module.new{
13
13
  attr_reader :raw
14
14
  })
15
- def @table.rows; super; end
15
+ def @table.cells_rows; super; end
16
16
  def @table.columns; super; end
17
17
  end
18
18
 
19
19
  it "should have rows" do
20
- @table.rows[0].map{|cell| cell.value}.should == %w{1 22 333}
20
+ @table.cells_rows[0].map{|cell| cell.value}.should == %w{1 22 333}
21
21
  end
22
22
 
23
23
  it "should have columns" do
@@ -26,7 +26,7 @@ module Cucumber
26
26
 
27
27
  it "should have same cell objects in rows and columns" do
28
28
  # 666666
29
- @table.rows[1].__send__(:[], 2).should equal(@table.columns[2].__send__(:[], 1))
29
+ @table.cells_rows[1].__send__(:[], 2).should equal(@table.columns[2].__send__(:[], 1))
30
30
  end
31
31
 
32
32
  it "should know about max width of a row" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.99.9
4
+ version: 0.1.99.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"
@@ -192,6 +192,7 @@ files:
192
192
  - examples/test_unit/features/test_unit.feature
193
193
  - examples/tickets/Rakefile
194
194
  - examples/tickets/cucumber.yml
195
+ - examples/tickets/features/172.feature
195
196
  - examples/tickets/features/lib/eatting_machine.rb
196
197
  - examples/tickets/features/lib/pantry.rb
197
198
  - examples/tickets/features/scenario_outline.feature