Skip to content

Commit

Permalink
Added test helper modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Stewart committed Nov 13, 2012
1 parent 1f5dc94 commit b22775a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
require "minitest/pride"
require "mocha"
require File.expand_path('../../lib/gitnesse.rb', __FILE__)

module FeatureTestMethods

# Creates a basic test feature
#
# Returns a string
def create_test_feature
<<-EOF
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Scenario: Add two numbers
Given I have entered 50 into the calculator
And I have entered 70 into the calculator
When I press add
Then the result should be 120 on the screen
EOF
end
end
10 changes: 10 additions & 0 deletions test/wiki_test_helper.rb
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
require "gollum"

module WikiTestMethods

# Creates a new Gollum wiki for testing
#
# Returns a gollum wiki
def create_wiki(dir = Dir.mktmpdir)
Gollum::Wiki.new(dir)
end
end

0 comments on commit b22775a

Please sign in to comment.