Permalink
Browse files

Release 0.1.99.10 - Rename Table#rows to Table#cells_rows to avoid co…

…nflict
  • Loading branch information...
aslakhellesoy committed Jan 26, 2009
1 parent 4caf9ef commit 56b80de09160746d4ae43393fc52c2b52ce3e85c
View
@@ -127,7 +127,7 @@ examples/test_unit/features/step_definitions/test_unit_steps.rb
examples/test_unit/features/test_unit.feature
examples/tickets/Rakefile
examples/tickets/cucumber.yml
-examples/tickets/features/77.feature
+examples/tickets/features/172.feature
examples/tickets/features/lib/eatting_machine.rb
examples/tickets/features/lib/pantry.rb
examples/tickets/features/scenario_outline.feature
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -8,7 +8,7 @@ def initialize(raw, scenario_outline)
end
def accept(visitor, status)
- rows.each_with_index do |row, n|
+ cells_rows.each_with_index do |row, n|
should_visit = n == 0 ||
row.at_lines?(visitor.current_feature_lines) ||
@scenario_outline.at_header_or_step_lines?(visitor.current_feature_lines)
View
@@ -19,11 +19,11 @@ def initialize(raw)
end
def at_lines?(lines)
- rows.detect { |row| row.at_lines?(lines) }
+ cells_rows.detect { |row| row.at_lines?(lines) }
end
def accept(visitor, status)
- rows.each do |row|
+ cells_rows.each do |row|
visitor.visit_table_row(row, status)
end
nil
@@ -42,7 +42,7 @@ def accept(visitor, status)
# [{'a' => '2', 'b' => '3', 'sum' => '5'}, {'a' => '7', 'b' => '9', 'sum' => '16'}]
#
def hashes
- @hashes ||= rows[1..-1].map do |row|
+ @hashes ||= cells_rows[1..-1].map do |row|
row.to_hash
end
end
@@ -68,7 +68,7 @@ def rows
# For testing only
def to_sexp #:nodoc:
- [:table, *rows.map{|row| row.to_sexp}]
+ [:table, *cells_rows.map{|row| row.to_sexp}]
end
def to_hash(cells) #:nodoc:
@@ -80,7 +80,7 @@ def to_hash(cells) #:nodoc:
end
def index(cells) #:nodoc:
- rows.index(cells)
+ cells_rows.index(cells)
end
def arguments_replaced(arguments) #:nodoc:
@@ -98,7 +98,7 @@ def arguments_replaced(arguments) #:nodoc:
end
def at_lines?(lines)
- rows.detect{|row| row.at_lines?(lines)}
+ cells_rows.detect{|row| row.at_lines?(lines)}
end
private
@@ -107,7 +107,7 @@ def col_width(col)
columns[col].__send__(:width)
end
- def rows
+ def cells_rows
@rows ||= cell_matrix.map do |cell_row|
@cells_class.new(self, cell_row)
end
@@ -2,7 +2,7 @@
require 'spec/expectations'
require 'spec/rails/matchers'
-class Cucumber::Rails::World
+Cucumber::Rails::World.class_eval do
include Spec::Matchers
include Spec::Rails::Matchers
end
View
@@ -3,7 +3,7 @@ class VERSION #:nodoc:
MAJOR = 0
MINOR = 1
TINY = 99
- PATCH = 9 # Set to nil for official release
+ PATCH = 10 # Set to nil for official release
STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
end
@@ -12,12 +12,12 @@ module Ast
@table.extend(Module.new{
attr_reader :raw
})
- def @table.rows; super; end
+ def @table.cells_rows; super; end
def @table.columns; super; end
end
it "should have rows" do
- @table.rows[0].map{|cell| cell.value}.should == %w{1 22 333}
+ @table.cells_rows[0].map{|cell| cell.value}.should == %w{1 22 333}
end
it "should have columns" do
@@ -26,7 +26,7 @@ def @table.columns; super; end
it "should have same cell objects in rows and columns" do
# 666666
- @table.rows[1].__send__(:[], 2).should equal(@table.columns[2].__send__(:[], 1))
+ @table.cells_rows[1].__send__(:[], 2).should equal(@table.columns[2].__send__(:[], 1))
end
it "should know about max width of a row" do

0 comments on commit 56b80de

Please sign in to comment.