Sha256: 99e1b500e02a195afacec6b56161a819e3ef0701e83b5f3d1b1db0d22e56cfe7

Contents?: true

Size: 591 Bytes

Versions: 2

Compression:

Stored size: 591 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"]]
    info[:actions].should == [["someAction"]]
  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

2 entries across 2 versions & 1 rubygems

Version Path
ib-0.1.2 spec/parser_spec.rb
ib-0.1.1 spec/parser_spec.rb