Sha256: 520e1a954fa42fe43931dbab0d488de9bcc311f68bf8daa219878aeed08b97de

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

require "spec_helper"

require "ib/parser"

describe IB::Parser do
  it "finds outlets and actions" do
    info = IB::Parser.new.find("spec/fixtures/custom_view.rb")
    info[:class].should == [["CustomView", "UIView"]]
    info[:outlets].should == [["greenLabel", "UIGreenLabel"], ["redLabel", "UILabel"], ["untyped_label", "id"], ["yellowLabel", "id"]]
    info[:actions].should == [["someAction"], ["anotherAction"], ["actionWithComment"], ["actionWithBrackets"]]
  end

  it "detects simple classes" do
    IB::Parser.new.find("spec/fixtures/simple_class.rb").should == false
  end

  it "finds all infos" do
    puts IB::Parser.new.find_all("spec/fixtures").inspect
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ib-0.1.3 spec/parser_spec.rb