spec/lib/ib/parser_spec.rb in ib-0.6.0 vs spec/lib/ib/parser_spec.rb in ib-0.7.0

- old
+ new

@@ -2,11 +2,11 @@ require "ib/parser" describe IB::Parser do it "finds outlets and actions" do - info = IB::Parser.new.find("spec/fixtures/common/custom_view.rb").first + info = IB::Parser.new(:ios).find("spec/fixtures/common/custom_view.rb").first info[:class].should == [["CustomView", "UIView"]] info[:outlets].should == [ ["greenLabel", "UIGreenLabel"], ["redLabel", "UILabel"], ["untyped_label", "id"], @@ -28,20 +28,20 @@ ["actionWithDefaultedArgs", "sender", nil] ] end it "can parse complex superclasses" do - info = IB::Parser.new.find("spec/fixtures/common/complex_superclass.rb") + info = IB::Parser.new(:ios).find("spec/fixtures/common/complex_superclass.rb") info.first[:class].should == [["HasComplexSuperClass", "Complex::SuperClass"]] info.last[:class].should == [["HasLessComplexSuperClass", "PM::Screen"]] end it "can output simple classes" do - IB::Parser.new.find("spec/fixtures/common/simple_class.rb").length.should == 1 + IB::Parser.new(:ios).find("spec/fixtures/common/simple_class.rb").length.should == 1 end it "finds all infos" do - infos = IB::Parser.new.find_all("spec/fixtures/dependency_test") + infos = IB::Parser.new(:ios).find_all("spec/fixtures/dependency_test") infos.values.each do |vals| vals.each do |v| expect(v).to be_kind_of(IB::OCInterface) end end