Sha256: ce1a2d6bc4a55a327fb2ac65cbaaa8198193345e27b25ed2ca06e97d4a245f40
Contents?: true
Size: 1.05 KB
Versions: 5
Compression:
Stored size: 1.05 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").first 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").length.should == 0 end it "finds all infos" do puts IB::Parser.new.find_all("spec/fixtures").inspect end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ib-0.2.7 | spec/parser_spec.rb |
ib-0.2.6 | spec/parser_spec.rb |
ib-0.2.5 | spec/parser_spec.rb |
ib-0.2.4 | spec/parser_spec.rb |
ib-0.2.3 | spec/parser_spec.rb |