require 'translate' describe Translate do it 'should give the pre method for a normal method' do Translate.method_pre(:method).should == :method_pre end it 'should give the pre method for a question method' do Translate.method_pre(:method?).should == :method_pre? end it 'should give the pre method for an exclamation method' do Translate.method_pre(:method!).should == :method_pre! end it 'should give the pre method for an assignment method' do Translate.method_pre(:method=).should == :method_pre= end it 'should give the pre method for an operator' do Translate.method_pre(:+).should == :op_plus_pre end it 'should give the post method for a normal method' do Translate.method_post(:method).should == :method_post end it 'should give the post method for a question method' do Translate.method_post(:method?).should == :method_post? end it 'should give the post method for an exclamation method' do Translate.method_post(:method!).should == :method_post! end it 'should give the post method for an assignment method' do Translate.method_post(:method=).should == :method_post= end it 'should give the post method for an operator' do Translate.method_post(:+).should == :op_plus_post end end