diff --git a/features/execute.feature b/features/execute.feature index b5d8ad74..3b6d1348 100644 --- a/features/execute.feature +++ b/features/execute.feature @@ -10,12 +10,16 @@ Feature: execute @no-clobber Scenario: No clones before running command when sourcecode have already been cloned + Given a basic setup with a puppet module "puppet-test" from "awesome" + And I successfully run `msync exec --verbose -- /bin/true` Then the file "modules/awesome/puppet-test/metadata.json" should exist When I successfully run `msync exec --verbose /bin/true` - Then the stdout should not contain "Cloning from 'file://" + Then the stdout from "msync exec --verbose /bin/true" should not contain "Cloning from 'file://'" @no-clobber Scenario: When command run fails and using default skip_broken value + Given a basic setup with a puppet module "puppet-test" from "awesome" + And I successfully run `msync exec --verbose -- /bin/true` When I run `msync exec --verbose -- /bin/false` Then the exit status should be 1 And the stderr should contain: @@ -25,6 +29,8 @@ Feature: execute @no-clobber Scenario: When command run fails and using skip_broken + Given a basic setup with a puppet module "puppet-test" from "awesome" + And I successfully run `msync exec --verbose -- /bin/true` When I run `msync exec --verbose -s -- /bin/false` Then the exit status should be 1 And the stderr should contain: diff --git a/features/reset.feature b/features/reset.feature index df41da39..f008a4d6 100644 --- a/features/reset.feature +++ b/features/reset.feature @@ -10,10 +10,12 @@ Feature: reset @no-clobber Scenario: Reset when sourcecodes have already been cloned - Given the file "modules/awesome/puppet-test/metadata.json" should exist + Given a basic setup with a puppet module "puppet-test" from "awesome" And the global option "branch" sets to "modulesync" + And I successfully run `msync reset --verbose` + Given the file "modules/awesome/puppet-test/metadata.json" should exist When I successfully run `msync reset --verbose` - Then the output should not contain "Cloning from 'file://" + Then the output from "msync reset --verbose" should not contain "Cloning from 'file://'" And the output should contain "Hard-resetting any local changes to repository in 'modules/awesome/puppet-test' from branch 'origin/master'" Scenario: Reset after an upstream file addition diff --git a/features/step_definitions/git_steps.rb b/features/step_definitions/git_steps.rb index d7739263..70e507da 100644 --- a/features/step_definitions/git_steps.rb +++ b/features/step_definitions/git_steps.rb @@ -22,7 +22,6 @@ Given 'a mocked git configuration' do steps %( - Given a mocked home directory And I run `git config --global user.name Aruba` And I run `git config --global user.email aruba@example.com` ) @@ -43,7 +42,7 @@ Given 'the global option {string} sets to {string}' do |key, value| steps %( - Given the file "#{Aruba.config.working_directory}/modulesync.yml" appended with: + Given the file "#{aruba.home_directory}/modulesync.yml" appended with: """ #{key}: #{value} """ diff --git a/features/support/env.rb b/features/support/env.rb index 2686e759..b86b262d 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -4,10 +4,9 @@ require_relative '../../spec/helpers/faker' -ModuleSync::Faker.working_directory = File.expand_path('faker', Aruba.config.working_directory) - Before do @aruba_timeout_seconds = 5 aruba.config.activate_announcer_on_command_failure = %i[stdout stderr] + ModuleSync::Faker.working_directory = File.expand_path('faker', aruba.home_directory) end diff --git a/modulesync.gemspec b/modulesync.gemspec index 3095e95b..2e20f6bf 100644 --- a/modulesync.gemspec +++ b/modulesync.gemspec @@ -17,8 +17,8 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_development_dependency 'aruba', '~>2.0' - spec.add_development_dependency 'cucumber', '~> 11.0' + spec.add_development_dependency 'aruba', '~> 3.0' + spec.add_development_dependency 'cucumber', '>= 11.0', '< 13' spec.add_development_dependency 'rake', '~> 13.2', '>= 13.2.1' spec.add_development_dependency 'rspec', '~> 3.13' spec.add_development_dependency 'voxpupuli-rubocop', '~> 5.3.0'