Skip to content

Commit

Permalink
Fixed issues with tests that hid #154
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Ratcliffe committed Feb 26, 2018
1 parent 649e682 commit a008d7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions features/cache.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ Feature: Create and maintain a .onceover cache
And the cache should contain all controlrepo files

Scenario: Creating a new file
Given control repo "caching"
Given existing control repo "caching"
When I create a file "example.txt"
And I run onceover command "run spec"
Then "example.txt" should be cached correctly

Scenario: Deleting a file
Given control repo "caching"
Given existing control repo "caching"
When I delete a file "deleteme.txt"
And I run onceover command "run spec"
Then "deleteme.txt" should be deleted from the cache

Scenario: Caching hidden files
Given control repo "caching"
Given existing control repo "caching"
When I create a file ".hidden/.hiddenfile"
And I run onceover command "run spec"
Then ".hidden/.hiddenfile" should be cached correctly
5 changes: 5 additions & 0 deletions features/step_definitions/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
FileUtils.cp_r "spec/fixtures/controlrepos/#{controlrepo_name}", @repo.tmp_folder
end

Given(/^existing control repo "([^"]*)"$/) do |controlrepo_name|
@repo = ControlRepo_Helper.new( controlrepo_name )
@cmd.controlrepo = @repo
end

Given(/^initialized control repo "([^"]*)"$/) do |controlrepo_name|
step %Q(control repo "#{controlrepo_name}")
step %Q(I run onceover command "init")
Expand Down

0 comments on commit a008d7e

Please sign in to comment.