Sha256: 8c1c6d772a4f832de86463dcd6b7fbc58937be8dc7be106011f1b5d48987edd1
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
$:.unshift File.expand_path('../../lib', __FILE__) require 'bacon' require 'ovaltine' describe 'StoryboardFormatter' do it 'writes valid output paths' do storyboard = Ovaltine::Storyboard.new('Main?P', []) formatter = Ovaltine::StoryboardFormatter.new(storyboard, '', '.') names = formatter.output_paths.map {|p| File.basename(p)} names.should.include 'Main_PStoryboard.m' names.should.include 'Main_PStoryboard.h' end it 'uses the prefix in output paths' do storyboard = Ovaltine::Storyboard.new('Main_iPhone', []) formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'ABC', '.') names = formatter.output_paths.map {|p| File.basename(p)} names.should.include 'ABCMain_iPhoneStoryboard.m' names.should.include 'ABCMain_iPhoneStoryboard.h' end it 'uses the prefix in the generated class name' do storyboard = Ovaltine::Storyboard.new('Onboarding', []) formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'DMU', '.') formatter.classname.should.equal 'DMUOnboardingStoryboard' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ovaltine-1.0.2 | specs/storyboard_formatter_spec.rb |
ovaltine-1.0.1 | specs/storyboard_formatter_spec.rb |
ovaltine-1.0.0 | specs/storyboard_formatter_spec.rb |