spec/mork/grid_spec.rb in mork-0.0.6 vs spec/mork/grid_spec.rb in mork-0.0.7
- old
+ new
@@ -1,10 +1,10 @@
require 'spec_helper'
module Mork
describe Grid do
- context 'default grid', focus: true do
+ context 'default grid' do
before(:all) do
@grid = Grid.new
@grid.set_page_size 1601, 2281 # the size of sample01.jpg
end
@@ -32,47 +32,47 @@
describe '#rm_search_area' do
context 'on the first iteration' do
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :tl reg_mark corner' do
c = @grid.rm_search_area :tl, 0
- c.should == { x: 23, y: 23, w: 76, h: 77 }
+ c.should == {:x=>15, :y=>15, :w=>76, :h=>77}
end
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :tr reg_mark corner' do
c = @grid.rm_search_area :tr, 0
- c.should == { x: 1502, y: 23, w: 76, h: 77 }
+ c.should == { x: 1510, y: 15, w: 76, h: 77 }
end
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :br reg_mark corner' do
c = @grid.rm_search_area :br, 0
- c.should == { x: 1502, y: 2181, w: 76, h: 77 }
+ c.should == { x: 1510, y: 2189, w: 76, h: 77 }
end
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :bl reg_mark corner' do
c = @grid.rm_search_area :bl, 0
- c.should == { x: 23, y: 2181, w: 76, h: 77 }
+ c.should == { x: 15, y: 2189, w: 76, h: 77 }
end
end
context 'on the third iteration' do
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :tl reg_mark corner' do
c = @grid.rm_search_area :tl, 2
- c.should == { x: 23, y: 23, w: 114, h: 115 }
+ c.should == { x: 15, y: 15, w: 114, h: 115 }
end
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :tr reg_mark corner' do
c = @grid.rm_search_area :tr, 2
- c.should == { x: 1464, y: 23, w: 114, h: 115 }
+ c.should == { x: 1471, y: 15, w: 114, h: 115 }
end
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :br reg_mark corner' do
c = @grid.rm_search_area :br, 2
- c.should == { x: 1464, y: 2143, w: 114, h: 115 }
+ c.should == { x: 1471, y: 2150, w: 114, h: 115 }
end
it 'returns an {:x, :y, :w, :h} hash of coordinates in pixels for the :bl reg_mark corner' do
c = @grid.rm_search_area :bl, 2
- c.should == { x: 23, y: 2143, w: 114, h: 115 }
+ c.should == { x: 15, y: 2150, w: 114, h: 115 }
end
end
end
describe '#rm_edgy_x' do