Sha256: 78ccced5faa815c8523404b581a451b1f123c896e0493493d6b22a4cd0df09d6

Contents?: true

Size: 712 Bytes

Versions: 11

Compression:

Stored size: 712 Bytes

Contents

module CustomMatcher  
  def set_cell(row, column, value)
    value = "'#{value}'" if value.is_a?(String)
    
    simple_matcher("setCell(#{row}, #{column}, #{value})") do |actual|
      actual =~ /data\.setCell\(#{row},\s*#{column},\s*#{value}\)/
    end
  end  
  
  def set_value(row, column, value)
    value = "'#{value}'" if value.is_a?(String)
    
    simple_matcher("setValue(#{row}, #{column}, #{value})") do |actual|
      actual =~ /data\.setValue\(#{row},\s*#{column},\s*#{value}\)/
    end
  end  
  
  def add_column(column_type, value)
    simple_matcher("addColumn('#{column_type}', '#{value}')") do |actual|
      actual =~ /data\.addColumn\('#{column_type}',\s*'#{value}'\)/
    end
  end
end

Version data entries

11 entries across 11 versions & 5 rubygems

Version Path
mitamirri-0.13.8 spec/custom_matchers.rb
glennr-seer-0.9.3 spec/custom_matchers.rb
seer-0.9.1 spec/custom_matchers.rb
seer-0.9.0 spec/custom_matchers.rb
sylvaing-seer-0.7.1 spec/custom_matchers.rb
seer-0.7.0 spec/custom_matchers.rb
seer-0.6.1 spec/custom_matchers.rb
seer-0.6.0 spec/custom_matchers.rb
ncri-seer-0.5.2 spec/custom_matchers.rb
ncri-seer-0.5.1 spec/custom_matchers.rb
seer-0.5.0 spec/custom_matchers.rb