Created
March 29, 2009 06:52
-
-
Save avh4/87303 to your computer and use it in GitHub Desktop.
the describe_project method doesn't work as I'm expecting it to. The following will not run the before block for each of the tests.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.dirname(__FILE__) + '/../spec_helper.rb' | |
def describe_project(name, &block) | |
describe name do | |
before(:each) do | |
@project = File.dirname(__FILE__) + "/../../test_data/#{name}/#{name}.xcodeproj" | |
@reader = XcodeprojReader::Reader.new(@project) | |
end | |
yield | |
end | |
end | |
describe "listing groups" do | |
describe_project "Default Cocoa Project" do | |
it "should return the number of groups" do | |
@reader.groups.size.should == 5 | |
end | |
it "should return the groups" do | |
@reader.groups.should == ["Classes", "Other Sources", "Resources", "Frameworks", "Products"] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment