spec/lib/query/token_spec.rb in picky-1.3.2 vs spec/lib/query/token_spec.rb in picky-1.3.3
- old
+ new
@@ -29,9 +29,23 @@
describe 'next_similar' do
before(:each) do
@bundle = stub :bundle
end
+ describe 'original' do
+ context 'with stub' do
+ before(:each) do
+ @bundle.stub! :similar => [:array, :of, :similar]
+
+ @token = Query::Token.processed 'similar~'
+ end
+ it 'should have a certain original text' do
+ @token.next_similar @bundle
+
+ @token.original.should == :array
+ end
+ end
+ end
context 'similar' do
context 'with stub' do
before(:each) do
@bundle.stub! :similar => [:array, :of, :similar]
\ No newline at end of file