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

- old
+ new

@@ -2,11 +2,11 @@ require "ib/generator" describe IB::Generator do describe "generates stubs header with ios platform" do - files = IB::Parser.new.find_all("spec/fixtures/common") + files = IB::Parser.new(:ios).find_all("spec/fixtures/common") stubs = IB::Generator.new(:ios).render_stub_file('generator/templates/Stubs.h.erb', files) it 'should output valid values from IB::Generator::RenderingHelpers and template file' do stubs.should == <<-OBJC // Generated by IB v#{IB::VERSION} gem. Do not edit it manually @@ -63,11 +63,11 @@ OBJC end end describe "generates stubs header with osx platform" do - files = IB::Parser.new.find_all("spec/fixtures/common") + files = IB::Parser.new(:osx).find_all("spec/fixtures/common") stubs = IB::Generator.new(:osx).render_stub_file('generator/templates/Stubs.h.erb', files) it 'should output valid values from IB::Generator::RenderingHelpers and template file' do stubs.should == <<-OBJC // Generated by IB v#{IB::VERSION} gem. Do not edit it manually @@ -75,11 +75,11 @@ #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #import <Cocoa/Cocoa.h> -@interface AppDelegate: UIResponder <UIApplicationDelegate> +@interface AppDelegate: NSObject <NSApplicationDelegate> @property IBOutlet UIWindow * window; @property IBOutlet UINavigationController * navigationController; @end @@ -124,11 +124,11 @@ OBJC end end describe "generates stubs implement" do - files = IB::Parser.new.find_all("spec/fixtures/common") + files = IB::Parser.new(:ios).find_all("spec/fixtures/common") stubs = IB::Generator.new(:ios).render_stub_file('generator/templates/Stubs.m.erb', files) it 'should output valid values from IB::Generator::RenderingHelpers and template file' do stubs.should == <<-OBJC // Generated by IB v#{IB::VERSION} gem. Do not edit it manually @@ -161,11 +161,11 @@ end end describe "generates stubs header with ios platform of dependency_test fixtures" do it 'should output definitions which sorterd by its own dependencies' do - files = IB::Parser.new.find_all("spec/fixtures/dependency_test") + files = IB::Parser.new(:ios).find_all("spec/fixtures/dependency_test") stubs = IB::Generator.new(:ios).render_stub_file('generator/templates/Stubs.h.erb', files) stubs.should == <<-OBJC // Generated by IB v#{IB::VERSION} gem. Do not edit it manually // Run `rake ib:open` to refresh @@ -210,10 +210,10 @@ end end describe "generates stubs header with ios platform of ProMotion's fixtures" do it 'should replace super_class from PM::* or ProMotion::* to UIViewController' do - files = IB::Parser.new.find_all("spec/fixtures/for_promotion") + files = IB::Parser.new(:ios).find_all("spec/fixtures/for_promotion") stubs = IB::Generator.new(:ios).render_stub_file('generator/templates/Stubs.h.erb', files) stubs.should == <<-OBJC // Generated by IB v#{IB::VERSION} gem. Do not edit it manually // Run `rake ib:open` to refresh