Sha256: 0b2162cd3e5b5466d4ba4eb50ffb498f628de380892c32633a6768efb38444f9

Contents?: true

Size: 803 Bytes

Versions: 3

Compression:

Stored size: 803 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe "Lookup" do
  before do
    # So it outputs text for us.
    OPTIONS.merge!({ :text => true })
  end
  
  it "should be able to find a constant" do
    Lookup.do("ActiveRecord::Base")
  end
  
  it "should be able to find a constant and a method (using hash symbol)" do
    Lookup.do("ActiveRecord::Base#new")
  end
  
  it "should be able to find a constant and a method (using space)" do
    Lookup.do("ActiveRecord::Base new")
  end
  
  it "should be able to do a fuzzy match on the method" do
    Lookup.do("ActiveRecord::Base#destry")
  end
  
  it "should prompt the user to be more specific" do
    Lookup.do("be")
  end
  
  it "should be able to do a fuzzy match on the constant and method" do
    Lookup.do("AR::B#destroy")
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
radar-lookup-0.1.0 spec/lookup_spec.rb
radar-lookup-0.2.0 spec/lookup_spec.rb
yyyc514-lookup-0.2.0 spec/lookup_spec.rb