Sha256: 5f5d77fcebed64114e8ad597dc04dfb93306f5917aad604ca21544ff5d9e2191
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
require File.expand_path('spec_helper', File.dirname(__FILE__)) module Imb describe BarPosition do describe '#map' do let(:ascender_bit) {mock 'ascender bit'} let(:descender_bit) {mock 'descender bit'} let(:characters) {mock 'array of characters'} let(:descender_character_position) {mock CharacterPosition} let(:ascender_character_position) {mock CharacterPosition} let(:bar_position) do BarPosition.new(descender_character_position, ascender_character_position) end let(:bar_symbol) {mock BarSymbol} before(:each) do descender_character_position.stub(:extract_bit_from_characters)\ .with(characters)\ .and_return(descender_bit) ascender_character_position.stub(:extract_bit_from_characters)\ .with(characters)\ .and_return(ascender_bit) BarSymbol.stub(:make)\ .with(ascender_bit, descender_bit)\ .and_return(bar_symbol) end specify do bar_position.map(characters).should == bar_symbol end end end end
Version data entries
4 entries across 4 versions & 1 rubygems