Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
Given(/^there is a wiki with Cucumber features defined$/) do | ||
pending # express the regexp above with the code you wish you had | ||
@wiki_dir = File.join(Dir.home, ".gitnesse/_features/wiki_with_features") | ||
end | ||
|
||
Given(/^there is a wiki with no Cucumber features defined$/) do | ||
pending # express the regexp above with the code you wish you had | ||
@wiki_dir = File.join(Dir.home, ".gitnesse/_features/wiki_without_features") | ||
end | ||
|
||
Given(/^there are no local features$/) do | ||
pending # express the regexp above with the code you wish you had | ||
@repo_dir = File.join(Dir.home, ".gitnesse/_features/repo_without_features") | ||
end | ||
|
||
Given(/^there are local features$/) do | ||
pending # express the regexp above with the code you wish you had | ||
@repo_dir = File.join(Dir.home, ".gitnesse/_features/repo_with_features") | ||
end | ||
|
||
Then(/^the local features should match the wiki$/) do | ||
pending # express the regexp above with the code you wish you had | ||
end | ||
@assertion_dir = File.join(Dir.home, ".gitnesse/_features/assert") | ||
|
||
system "git clone #{@wiki_dir} #{@assertion_dir} &> /dev/null" | ||
|
||
wiki_features = Dir.glob("#{@assertion_dir}/**/*.feature.md") | ||
repo_features = Dir.glob("#{@repo_dir}/features/**/*.feature") | ||
|
||
wiki_features.map! { |f| File.basename(f, ".md") } | ||
repo_features.map! { |f| File.basename(f) } | ||
|
||
FileUtils.rm_rf(@assertion_dir) | ||
FileUtils.mkdir_p(@assertion_dir) | ||
|
||
wiki_features.each do |feature| | ||
expect(repo_features).to include feature | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
When(/^I pull features$/) do | ||
pending | ||
Dir.chdir(@repo_dir) do | ||
system "gitnesse pull &> /dev/null" | ||
end | ||
end |
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