Sha256: 11732f55bc56a0d041b0ad6919864c71cc8dd193f9587f21470ca43115d0bc4b

Contents?: true

Size: 1009 Bytes

Versions: 3

Compression:

Stored size: 1009 Bytes

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 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

3 entries across 3 versions & 1 rubygems

Version Path
ib-0.2.5 spec/generator_spec.rb
ib-0.2.4 spec/generator_spec.rb
ib-0.2.3 spec/generator_spec.rb