drnic / rbiphonetest

Want to write iPhone apps with unit tests? Want to write them in Ruby?

rbiphonetest / features / new_project.feature
100644 31 lines (26 sloc) 1.39 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Feature: Created a new Objective-C project that can be tested by Ruby tests
  In order to reduce the cost of development and maintenance of Objective-C projects
  As an Objective-C developer
  I want a generator for new Objective-C libraries that are covered by Ruby tests
 
  Scenario: Generate new project (defaults test/unit)
    Given a safe folder
    When I execute rbiphonetest for project 'my_project' with options ''
    Then file 'Rakefile' is created
    And file 'Classes/MyProject.h' is created
    And file 'Classes/MyProject.m' is created
    And file 'Classes/MyProject.m' contents does match /void Init_MyProject\(\) \{ \}/
    And file 'Classes/MyProject.m' contents does match /#import "MyProject.h"/
    And Rakefile can display tasks successfully
    And file 'test/test_helper.rb' is created
  
  Scenario: Generate new test/unit project
    Given a safe folder
    When I execute rbiphonetest for project 'my_project' with options '--test-with=test_unit'
    Then file 'Rakefile' is created
    And Rakefile can display tasks successfully
    And file 'test/test_helper.rb' is created
 
Scenario: Generate new rspec project
    Given a safe folder
    When I execute rbiphonetest for project 'my_project' with options '--test-with=rspec'
    Then file 'Rakefile' is created
    And Rakefile can display tasks successfully
    And file 'spec/spec_helper.rb' is created