Skip to content

Commit

Permalink
cqfn#126 Start using aruba to test stderr.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Vinogradov committed Jul 11, 2019
1 parent 639dac6 commit 524d4a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ Gemfile.lock
.bundle/
.DS_Store
rdoc/
tmp/
17 changes: 11 additions & 6 deletions features/rake.feature
@@ -1,13 +1,18 @@
Feature: Rake Task
Scenario: For now we failed if run rake task
Given It is Unix
And I have a "Rakefile" file with content:
And a file named "Rakefile" with:
"""
require 'pdd/rake_task'
PDD::RakeTask.new
"""
When I run bash with "rake pdd"
Then Exit code is not zero
# @todo #114:30m For now, there haven't a proper method to check STDERR.
# In this test I've tried to check the output with Stdout contains but there is not working.
# Needs a proper alternative to check stderr.
# @todo #126:30m For now there is warning when I run test.
# Needs to replace current call to not deprecated one.
When I run "rake bin/pdd"
Then the exit status should be 1
And the stderr should contain:
"""
NOT IMPLEMENTED
"""
When I remove a file named "Rakefile" with full force
Then a file named "Rakefile" does not exist
1 change: 1 addition & 0 deletions features/support/env.rb
Expand Up @@ -20,3 +20,4 @@

require 'simplecov'
require_relative '../../lib/pdd'
require 'aruba/cucumber'
1 change: 1 addition & 0 deletions pdd.gemspec
Expand Up @@ -47,6 +47,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'nokogiri', '1.10.3'
s.add_runtime_dependency 'rainbow', '~>3.0'
s.add_runtime_dependency 'slop', '4.6.1'
s.add_development_dependency 'aruba', '~> 0.14.1'
s.add_development_dependency 'codecov', '0.1.10'
s.add_development_dependency 'cucumber', '3.1.0'
s.add_development_dependency 'minitest', '5.5.0'
Expand Down

0 comments on commit 524d4a1

Please sign in to comment.