Sha256: 04f68486b37431280ae265ed3b09b4cb3fc7e15815663a0dd222bb2a3f0113ea

Contents?: true

Size: 566 Bytes

Versions: 6

Compression:

Stored size: 566 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"]]
    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

6 entries across 6 versions & 1 rubygems

Version Path
ib-0.1.0 spec/parser_spec.rb
ib-0.0.5 spec/parser_spec.rb
ib-0.0.4 spec/parser_spec.rb
ib-0.0.3 spec/parser_spec.rb
ib-0.0.2 spec/parser_spec.rb
ib-0.0.1 spec/parser_spec.rb