Sha256: 5e5a97ed57037e60111693fd8e38bfbc92a445a56d018ba3659b5d5c05cded6d
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
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[:outlet_collections].should == [ ["greenLabelCollection", "UIGreenLabel"], ["redLabelCollection", "UILabel"], ["untyped_label_collection", "id"], ["yellowLabelCollection", "id"] ] info[:actions].should == [ ["someAction", "sender"], ["anotherAction", "button"], ["actionWithComment", "sender"], ["actionWithBrackets", "sender"], ["actionWithoutArgs", nil] ] 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ib-0.2.2 | spec/parser_spec.rb |
ib-0.2.1 | spec/parser_spec.rb |
ib-0.2.0 | spec/parser_spec.rb |
ib-0.1.4 | spec/parser_spec.rb |