Sha256: 0523d04c4f08a2d39078e1548db77bfd602d0b9b359032254bd5dc961a84a452

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

require "spec_helper"

require "ib/generator"

describe IB::Generator do
  it "generates stubs" do
    files = IB::Parser.new.find_all("spec/fixtures")
    stubs = IB::Generator.new.generate_objc(files)
    stubs.should == <<-OBJC
@interface AppDelegate

@property IBOutlet UIWindow * window;
@property IBOutlet UINavigationController * navigationController;





@end


@interface CustomView: UIView

@property IBOutlet UIGreenLabel * greenLabel;
@property IBOutlet UILabel * redLabel;
@property IBOutlet id untyped_label;
@property IBOutlet id yellowLabel;

@property IBOutletCollection(UIGreenLabel) NSArray * greenLabelCollection;
@property IBOutletCollection(UILabel) NSArray * redLabelCollection;
@property IBOutletCollection(id) NSArray * untyped_label_collection;
@property IBOutletCollection(id) NSArray * yellowLabelCollection;

-(IBAction) someAction:(id) sender;
-(IBAction) anotherAction:(id) button;
-(IBAction) actionWithComment:(id) sender;
-(IBAction) actionWithBrackets:(id) sender;
-(IBAction) actionWithoutArgs;

@end


@interface EmptyView: UIView







@end


@interface AnotherView: EmptyView







@end


OBJC
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ib-0.2.7 spec/generator_spec.rb
ib-0.2.6 spec/generator_spec.rb